class methods
Extends
This class extends others, you can call their methods on an instance of ofIcoSpherePrimitive too:
The ofIcoSpherePrimitive allows you to create an icosphere, which is a sphere not based on UV slices like the ofSpherePrimitive, but rather faces. Like this:
Like all primitives it allows you to set the radius, draw it, set positions, etc.
void setup()
{
icoSphere.setRadius( width );
}
void draw()
{
icoSphere.setPosition(ofGetWidth()*.2, ofGetHeight()*.75, 0);
icoSphere.rotate(spinX, 1.0, 0.0, 0.0);
icoSphere.rotate(spinY, 0, 1.0, 0.0);
// get all the faces from the icoSphere, handy when you want to copy
// individual vertices or tweak them a little ;)
vector<ofMeshFace> triangles = icoSphere.getMesh().getUniqueFaces();
// now draw
icoSphere.draw();
}
Last updated 수요일, 08 3월 2023 18:07:48 UTC - 7c9ee203c70f155d301b41aa9b34dcc286921a3c
If you have any doubt about the usage of this module you can ask in the forum.
If you want to contribute better documentation or start documenting this section you can do so here
If you find anything wrong with this docs you can report any error by opening an issue