Das PolyCore Objekt beinhaltet alle Daten eines Polygon Objekts. Es besitzt alle Informationen über Punkte, Polygon UV Koordinaten, Polygon Selektionen, Kanten, Nähte etc. Ein PolyCore Objekt kann nicht manuell erzeugt werden. Es ist ausschließlich erzeugt über die Funktionsaufrufe core() oder modCore() eines Polygon Objekts.
Eigenschaften
Konstruktor
Methoden
Number addIndexPolygon(Number size])
Number addIndexPolygon(Number size, Number p[])
Number addIndexPolygon(Number size, Number p[], Vector2f uv[]) |
|
|
|
Fügt ein neues Polygon mit size Ecken dem Objekt hinzu. Sie können entweder ein leeres Polygon oder ein Polygon mit einem Array aus Punkten oder optional ein Array aus UV Koordinaten erzeugen. Zu beachten ist, das bei Punkten diese auf ein Punkte Index Array p[] referenzieren - das sollte daher bereits existieren. have to exist. Es könnte sonst zu einem Absturz führen. |
Number addPolygon(Number size)
Number addPolygon(Number size, bool meshed, Vec3D p[])
Number addPolygon(Number size, bool meshed, Vec3D p[], Vec2D uv[]) |
|
|
|
Fügt ein neues Polygon mit size Ecken dem Objekt hinzu. Sie können entweder ein leeres Polygon oder ein Polygon mit einem Array aus Punkten oder optional ein Array aus UV Koordinaten erzeugen. If meshed=true Cheetah3D tries to reuse vertices which results in a connected mesh. So in most cases meshed=true is recommended. |
Number addVertex(Boolean meshed, Vec3D vert) |
|
|
|
Adds the vertex vert to the object. If meshed=true Cheetah3D first searches for a vertex with the same coordiantes if it findes one it returns the index of the existing vertex. If it doesn't find a vertex with the same coordinates it adds a new vertex to the vertex array and returns the index of the new vertex. If meshed=false Cheetah3D Cheetah3D adds the vertex without the test. |
void buildVertexBSP(Vec3D bmin, Vec3D bmax) |
|
|
|
Creates an internal BSP tree within the box spanned up from bmin to bmax. If a BSP tree is created the addVertex() and addPolygon() functions offer an much increased performance. When you are done with the creation of the mesh always call destroyVertexBSP() to free up the memory of the BSP tree. |
void deletePolygon() |
|
|
|
Deletes the polygon at pindex. |
void deleteVertex(Number vindex) |
|
|
|
Deletes the vertex at vindex. |
void destroyVertexBSP() |
|
|
|
Destroys the BSP tree and frees up it's memory. |
Number cornerCount() |
|
|
|
Return the number of corners in the object. Each ngon as n corners. |
Boolean edgeSelection(Number pindex, Number eindex, Number mask) |
|
|
|
Returns the status of various edge and corner properties of the eindex'th edge of the polygon at index pindex. To access the vaious properties us the constants from the table below.
|
SELECT |
returns the selection of the edge |
|
UVPOINT |
returns the selection of the corner in the UV editor |
|
UVEDGE |
returns the selection of the edge in the UV editor |
|
UVPINNED |
returns if the corner is pinned |
|
SEAM |
returns if the edge is a seam |
|
CREASE |
returns if the edge is a crease |
|
void flipWinding(Number pindex) |
|
|
|
Changes the winding of polygon pindex. |
Number materialTagIndex(Number pindex) |
|
|
|
Returns the index of the material tag which the polygon at pindex uses. Use the materialTags() function call of the Object class to retrieve all available materials tags. If the return of this function is greater or equal to the number of material tags no material is assigned to that polygon. |
Vec3D normal(Number pindex)
Vec3D normal(Number pindex, Number cindex) |
|
|
|
Returns the normal perpendicular to polygon pindex if you only pass in the polygon index. If you also hand over the index of the corner cindex the returned normal will be the smoothed normal. |
Number polygonCount() |
|
|
|
Return the number of polygons in the object. |
Boolean polygonSelection(Number pindex) |
|
|
|
Returns true if the polygon at pindex is selected. |
Number polygonSize(Number pindex) |
|
|
|
Returns the size or better the number of corners of the polygon at pindex. |
void setActivePolygonSelection(Number polysel) |
|
|
|
Changes the active polygon selection. Cheetah3D has 16 independet polygon selections. So you can pass in values form [0,15]. |
|