A3DL::PolygonMesh Class Reference
[libmetaobject_a3dl]
#include <vos/metaobjects/a3dl/polygonmesh.hh>
Inheritance diagram for A3DL::PolygonMesh:

Detailed Description
A 3D object comprised of a set of polygons.In addition to overall material information, each polygon may also have its own material/texture information.
Definition at line 46 of file polygonmesh.hh.
Public Types
- typedef std::vector< int > Polygon
- NoTexture = 0
- UVcoord = 1
- PolygonPlane = 2
- ArbitraryPlane = 3
- TexMatrix = 4
- enum TextureType {
NoTexture = 0, UVcoord = 1, PolygonPlane = 2, ArbitraryPlane = 3,
TexMatrix = 4
}
Public Member Functions
- PolygonMesh (VOS::VobjectBase *superobject)
- ~PolygonMesh ()
- virtual void setVertex (unsigned int which, A3DL::PolygonMesh::Vertex &v)
- virtual void setVertices (const std::vector< A3DL::PolygonMesh::Vertex > &v)
- virtual void getVertices (std::vector< A3DL::PolygonMesh::Vertex > &v)
- virtual void setPolygon (unsigned int which, A3DL::PolygonMesh::Polygon &v)
- Change a single polygon.
- Change a single polygon.
- virtual void setPolygons (const std::vector< A3DL::PolygonMesh::Polygon > &v)
- virtual void getPolygons (std::vector< A3DL::PolygonMesh::Polygon > &v)
- virtual void setNormal (unsigned int which, A3DL::PolygonMesh::Vertex &v)
- virtual void setNormals (const std::vector< A3DL::PolygonMesh::Vertex > &v)
- virtual void getNormals (std::vector< A3DL::PolygonMesh::Vertex > &v)
- virtual void setTexel (int which, A3DL::PolygonMesh::Texel &v)
- virtual void setTexels (const std::vector< A3DL::PolygonMesh::Texel > &v)
- virtual void getTexels (std::vector< Texel > &v)
- virtual void setTextureSpace (unsigned int which, const A3DL::PolygonMesh::TextureSpace &t)
- virtual void setTextureSpaces (const std::vector< A3DL::PolygonMesh::TextureSpace > &t)
- virtual void getTextureSpaces (std::vector< A3DL::PolygonMesh::TextureSpace > &t)
- virtual void setDoubleSided (bool ds)
- virtual bool getDoubleSided ()
- virtual PortalIterator getPortals ()
- virtual VUtil::vRef< VOS::Property > getLightmapObj ()
- virtual const std::string getVOSType ()
Static Public Member Functions
- static void unpackTextureSpace (const unsigned char *data, A3DL::PolygonMesh::TextureSpace &t)
- static void packTextureSpace (unsigned char *data, const A3DL::PolygonMesh::TextureSpace &t)
- static MetaObject * new_PolygonMesh (VOS::VobjectBase *superobject, const std::string &type)
Classes
- class Texel
- struct TextureSpace
- class Vertex
Member Typedef Documentation
| typedef std::vector<int> A3DL::PolygonMesh::Polygon |
Definition at line 59 of file polygonmesh.hh.
Member Enumeration Documentation
Definition at line 68 of file polygonmesh.hh.
Constructor & Destructor Documentation
| A3DL::PolygonMesh::PolygonMesh | ( | VOS::VobjectBase * | superobject | ) |
| A3DL::PolygonMesh::~PolygonMesh | ( | ) |
Member Function Documentation
| virtual bool A3DL::PolygonMesh::getDoubleSided | ( | ) | [virtual] |
Are these polygons double sided?
- Returns:
- true for double sided polygons, false for single sided polygons.
| virtual VUtil::vRef<VOS::Property> A3DL::PolygonMesh::getLightmapObj | ( | ) | [virtual] |
| virtual void A3DL::PolygonMesh::getNormals | ( | std::vector< A3DL::PolygonMesh::Vertex > & | v | ) | [virtual] |
Get the normal std::vectors.
- Parameters:
-
v the normals will be stored in this std::vector
| virtual void A3DL::PolygonMesh::getPolygons | ( | std::vector< A3DL::PolygonMesh::Polygon > & | v | ) | [virtual] |
Get all polygons.
- Parameters:
-
v the polygons will be filled into this std::vector
| virtual PortalIterator A3DL::PolygonMesh::getPortals | ( | ) | [virtual] |
| virtual void A3DL::PolygonMesh::getTexels | ( | std::vector< Texel > & | v | ) | [virtual] |
Get all UV coordinates.
- Parameters:
-
v the UV coordinates will be stored in this std::vector
| virtual void A3DL::PolygonMesh::getTextureSpaces | ( | std::vector< A3DL::PolygonMesh::TextureSpace > & | t | ) | [virtual] |
Get the current texture spaces used for polygons.
- Parameters:
-
t the texture spaces will be stored here
| virtual void A3DL::PolygonMesh::getVertices | ( | std::vector< A3DL::PolygonMesh::Vertex > & | v | ) | [virtual] |
Get all vertices.
- Parameters:
-
v the vertices will be filled into this std::vector
| virtual const std::string A3DL::PolygonMesh::getVOSType | ( | ) | [virtual] |
- Returns:
- the specific VOS type name that represents the VOS interface this object is supplying. This should always be overridden by the subclass.
Reimplemented from A3DL::Object3D.
| static MetaObject* A3DL::PolygonMesh::new_PolygonMesh | ( | VOS::VobjectBase * | superobject, | |
| const std::string & | type | |||
| ) | [static] |
| static void A3DL::PolygonMesh::packTextureSpace | ( | unsigned char * | data, | |
| const A3DL::PolygonMesh::TextureSpace & | t | |||
| ) | [static] |
| virtual void A3DL::PolygonMesh::setDoubleSided | ( | bool | ds | ) | [virtual] |
Set whether to treat polygons as double sided or single sided.
If one sided, the direction (normal) will be determined using the cross product of the first two edges, with the vertices listed in clockwise order.
- Parameters:
-
ds the flag, true for double sided, false for single sided
| virtual void A3DL::PolygonMesh::setNormal | ( | unsigned int | which, | |
| A3DL::PolygonMesh::Vertex & | v | |||
| ) | [virtual] |
Set the vertex normal std::vector, used for lighting.
- Parameters:
-
which the index of the vertex this normal applies to v the normal std::vector value
| virtual void A3DL::PolygonMesh::setNormals | ( | const std::vector< A3DL::PolygonMesh::Vertex > & | v | ) | [virtual] |
Set all the normals at once.
- Parameters:
-
v array of vertex normals
| virtual void A3DL::PolygonMesh::setPolygon | ( | unsigned int | which, | |
| A3DL::PolygonMesh::Polygon & | v | |||
| ) | [virtual] |
Change a single polygon.
This is very efficient for strictly triangular meshes, less efficient for polygonal meshes.
- Parameters:
-
which the index of polygon to set v the new polygon
| virtual void A3DL::PolygonMesh::setPolygons | ( | const std::vector< A3DL::PolygonMesh::Polygon > & | v | ) | [virtual] |
Set all polygons at once.
- Parameters:
-
v new polygon list
| virtual void A3DL::PolygonMesh::setTexel | ( | int | which, | |
| A3DL::PolygonMesh::Texel & | v | |||
| ) | [virtual] |
Set all UV coordinates at once.
- Parameters:
-
which the vertex index this UV coordinate applies to v the UV coordinates for this
| virtual void A3DL::PolygonMesh::setTexels | ( | const std::vector< A3DL::PolygonMesh::Texel > & | v | ) | [virtual] |
Set all UV coordinates at once.
- Parameters:
-
v the UV coordinates for each vertex.
| virtual void A3DL::PolygonMesh::setTextureSpace | ( | unsigned int | which, | |
| const A3DL::PolygonMesh::TextureSpace & | t | |||
| ) | [virtual] |
Set the texture std::mapping for a specific polygon.
- Parameters:
-
which the polygon index to be changed t the new texture space to use
| virtual void A3DL::PolygonMesh::setTextureSpaces | ( | const std::vector< A3DL::PolygonMesh::TextureSpace > & | t | ) | [virtual] |
Set the per-polygon texture spaces.
- Parameters:
-
t the texture space to use for each polygon
| virtual void A3DL::PolygonMesh::setVertex | ( | unsigned int | which, | |
| A3DL::PolygonMesh::Vertex & | v | |||
| ) | [virtual] |
Set a single vertex.
- Parameters:
-
which the index of vertex to set v the new vertex value
| virtual void A3DL::PolygonMesh::setVertices | ( | const std::vector< A3DL::PolygonMesh::Vertex > & | v | ) | [virtual] |
Set all vertices at once.
- Parameters:
-
v the new vertex array
| static void A3DL::PolygonMesh::unpackTextureSpace | ( | const unsigned char * | data, | |
| A3DL::PolygonMesh::TextureSpace & | t | |||
| ) | [static] |
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/metaobjects/a3dl/polygonmesh.hh