|
Cortex 6.0.0
|
#include <MeshPrimitive.h>
Inheritance diagram for IECore::MeshPrimitive:Public Member Functions | |
| IE_CORE_DECLAREOBJECT (MeshPrimitive, Primitive) | |
| MeshPrimitive () | |
| Construct a MeshPrimitive with no faces. | |
| MeshPrimitive (ConstIntVectorDataPtr verticesPerFace, ConstIntVectorDataPtr vertexIds, const std::string &interpolation="linear", V3fVectorDataPtr p=0) | |
| virtual size_t | variableSize (PrimitiveVariable::Interpolation interpolation) const |
| virtual void | render (Renderer *renderer) const |
| Render the mesh. | |
Topology access | |
These functions allow access to get and set topology after construction. | |
| size_t | numFaces () const |
| const IntVectorData * | verticesPerFace () const |
| const IntVectorData * | vertexIds () const |
| const std::string & | interpolation () const |
| virtual void | setTopology (ConstIntVectorDataPtr verticesPerFace, ConstIntVectorDataPtr vertexIds, const std::string &interpolation="linear") |
| void | setInterpolation (const std::string &interpolation) |
| PolygonIterator | faceBegin () |
| PolygonIterator | faceEnd () |
Static Public Member Functions | |
| static MeshPrimitivePtr | createBox (const Imath::Box3f &b) |
| static MeshPrimitivePtr | createPlane (const Imath::Box2f &b) |
The MeshPrimitive represents a collection of polygonal faces. The faces should be planar and may not have holes, but can have concavities. By default a polygon is considered frontfacing if it's vertices wind in an anticlockwise direction from the point of view of the camera - this can be changed at the point of rendering by setting attributes in the Renderer. This definition of winding order is the same as the OpenGL and Maya conventions but the opposite of RenderMan's.
| IECore::MeshPrimitive::MeshPrimitive | ( | ConstIntVectorDataPtr | verticesPerFace, |
| ConstIntVectorDataPtr | vertexIds, | ||
| const std::string & | interpolation = "linear", |
||
| V3fVectorDataPtr | p = 0 |
||
| ) |
Construct a MeshPrimitive. The number of faces specified by verticesPerFace->readable()->size(). Copies of the IntVectorData objects are taken rather than references to the initial data.
| static MeshPrimitivePtr IECore::MeshPrimitive::createBox | ( | const Imath::Box3f & | b | ) | [static] |
Creates a box mesh.
| static MeshPrimitivePtr IECore::MeshPrimitive::createPlane | ( | const Imath::Box2f & | b | ) | [static] |
Creates a plane at z=0, with the geometric normal facing down positive z.
| virtual size_t IECore::MeshPrimitive::variableSize | ( | PrimitiveVariable::Interpolation | interpolation | ) | const [virtual] |
Returns the number of values a piece of data must provide for the given interpolation type. Must be implemented in all derived classes.
Implements IECore::Primitive.
1.7.3