#include <polygon.h>
Inheritance diagram for iPolygon3D:
Public Methods | |
virtual csPolygon3D* | GetPrivateObject ()=0 |
@ UGLY! Used by engine to retrieve internal object structure. More... | |
virtual iObject* | QueryObject ()=0 |
Get the iObject for this polygon. | |
virtual iThingState* | GetParent ()=0 |
Get the thing (container) that this polygon belongs to. More... | |
virtual iLightMap* | GetLightMap ()=0 |
Get the lightmap associated with this polygon. | |
virtual iPolygonTexture* | GetTexture ()=0 |
Get the handle to the polygon texture object. | |
virtual iMaterialHandle* | GetMaterialHandle ()=0 |
Get the material handle for the texture manager. | |
virtual void | SetMaterial (iMaterialWrapper *mat)=0 |
Set the material for this polygon. | |
virtual iMaterialWrapper* | GetMaterial ()=0 |
Get the material for this polygon. | |
virtual int | GetVertexCount ()=0 |
Query number of vertices in this polygon. | |
virtual int* | GetVertexIndices ()=0 |
Get the vertex indices array. | |
virtual const csVector3& | GetVertex (int idx) const=0 |
Get the given polygon vertex coordinates in object space. | |
virtual const csVector3& | GetVertexW (int idx) const=0 |
Get the given polygon vertex coordinates in world space. | |
virtual const csVector3& | GetVertexC (int idx) const=0 |
Get the given polygon vertex coordinates in camera space. | |
virtual int | CreateVertex (int idx)=0 |
Create a polygon vertex given his index in parent polygon set. | |
virtual int | CreateVertex (const csVector3 &iVertex)=0 |
Create a polygon vertex and add it to parent object. | |
virtual int | GetAlpha ()=0 |
Get the alpha transparency value for this polygon. | |
virtual void | SetAlpha (int iAlpha)=0 |
Set the alpha transparency value for this polygon (only if it is a portal). More... | |
virtual void | CreatePlane (const csVector3 &iOrigin, const csMatrix3 &iMatrix)=0 |
Create a private polygon texture mapping plane. | |
virtual bool | SetPlane (const char *iName)=0 |
Set polygon texture mapping plane. | |
virtual csFlags& | GetFlags ()=0 |
Set polygon flags (see CS_POLY_... values above). | |
virtual void | SetLightingMode (bool iGouraud)=0 |
Set Gouraud vs lightmap polygon lighting. | |
virtual iPortal* | CreateNullPortal ()=0 |
Create a null pointer pointing to no sector. More... | |
virtual iPortal* | CreatePortal (iSector *iTarget)=0 |
Create a portal object pointing to given sector. | |
virtual iPortal* | GetPortal ()=0 |
Return the pointer to the portal if there is one. | |
virtual void | SetTextureSpace (const csVector3 &p1, const csVector2 &uv1, const csVector3 &p2, const csVector2 &uv2, const csVector3 &p3, const csVector2 &uv3)=0 |
Set the texture space transformation given three vertices and their uv coordinates. | |
virtual void | SetTextureSpace (const csVector3 &v_orig, const csVector3 &v1, float l1)=0 |
Calculate the matrix using two vertices (which are preferably on the plane of the polygon and are possibly (but not necessarily) two vertices of the polygon). More... | |
virtual void | SetTextureSpace (const csVector3 &v_orig, const csVector3 &v1, float len1, const csVector3 &v2, float len2)=0 |
Calculate the matrix using 'v1' and 'len1' for the u-axis and 'v2' and 'len2' for the v-axis. | |
virtual void | SetTextureSpace (csMatrix3 const &, csVector3 const &)=0 |
The most general function. More... | |
virtual void | SetTextureSpace (iPolyTxtPlane *plane)=0 |
With this function you let this polygon share the given plane. | |
virtual void | SetTextureType (int type)=0 |
Set type of texturing to use for this polygon (one of the POLYTXT_??? flags). More... | |
virtual void | CopyTextureType (iPolygon3D *other_polygon)=0 |
Copy texture type settings from another polygon. More... | |
virtual int | GetTextureType ()=0 |
Get the polygon texture type (one of POLYTXT_XXX values). | |
virtual const csPlane3& | GetWorldPlane ()=0 |
Get world space plane. | |
virtual const csPlane3& | GetObjectPlane ()=0 |
Get object space plane. | |
virtual const csPlane3& | GetCameraPlane ()=0 |
Get camera space plane. | |
virtual bool | IsTransparent ()=0 |
Return true if this polygon or the texture it uses is transparent. | |
virtual float | GetCosinusFactor ()=0 |
Get cosinus factor. | |
virtual void | SetCosinusFactor (float cosfact)=0 |
Set cosinus factor. | |
virtual iPolyTexType* | GetPolyTexType ()=0 |
Get the polygon texture type. | |
virtual void | UpdateVertexLighting (iLight *light, const csColor &lcol, bool dynamic, bool reset)=0 |
Update vertex lighting for this polygon. More... | |
virtual unsigned long | GetPolygonID ()=0 |
Get a unique ID for this polygon. More... | |
virtual bool | IntersectSegment (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr=NULL)=0 |
Intersect object-space segment with this polygon. More... | |
virtual bool | IntersectRay (const csVector3 &start, const csVector3 &end)=0 |
Intersect object-space ray with this polygon. More... | |
virtual bool | IntersectRayNoBackFace (const csVector3 &start, const csVector3 &end)=0 |
Intersect object-space ray with this polygon. More... | |
virtual bool | IntersectRayPlane (const csVector3 &start, const csVector3 &end, csVector3 &isect)=0 |
Intersect object space ray with the plane of this polygon and returns the intersection point. More... | |
virtual bool | PointOnPolygon (const csVector3 &v)=0 |
This is a given point is on (or very nearly on) this polygon. More... |
|
Copy texture type settings from another polygon. (this will not copy the actual material that is used, just the information on how to apply that material to the polygon). |
|
Create a null pointer pointing to no sector. It is preferably to set a missing sector callback on the returned portal. |
|
Get the thing (container) that this polygon belongs to. The reference counter on iThingState is NOT incremented. |
|
Get a unique ID for this polygon. This is only unique relative to the polygon parent. |
|
@ UGLY! Used by engine to retrieve internal object structure. @ |
|
Intersect object-space ray with this polygon. This function is similar to IntersectSegment except that it doesn't keep the lenght of the ray in account. It just tests if the ray intersects with the interior of the polygon. Note that this function also does back-face culling. |
|
Intersect object-space ray with this polygon. This function is similar to IntersectSegment except that it doesn't keep the lenght of the ray in account. It just tests if the ray intersects with the interior of the polygon. Note that this function doesn't do back-face culling. |
|
Intersect object space ray with the plane of this polygon and returns the intersection point. This function does not test if the intersection is inside the polygon. It just returns the intersection with the plane (in or out). This function returns false if the ray is parallel with the plane (i.e. there is no intersection). |
|
Intersect object-space segment with this polygon. Return true if it intersects and the intersection point in world coordinates. |
|
This is a given point is on (or very nearly on) this polygon. Test happens in object space. |
|
Set the alpha transparency value for this polygon (only if it is a portal). Not all renderers support all possible values. 0, 25, 50, 75, and 100 will always work but other values may give only the closest possible to one of the above. |
|
The most general function. With these you provide the matrix directly. |
|
Calculate the matrix using two vertices (which are preferably on the plane of the polygon and are possibly (but not necessarily) two vertices of the polygon). The first vertex is seen as the origin and the second as the u-axis of the texture space coordinate system. The v-axis is calculated on the plane of the polygon and orthogonal to the given u-axis. The length of the u-axis and the v-axis is given as the 'len1' parameter. For example, if 'len1' is equal to 2 this means that texture will be tiled exactly two times between vertex 'v_orig' and 'v1'. I hope this explanation is clear since I can't seem to make it any clearer :-) |
|
Set type of texturing to use for this polygon (one of the POLYTXT_??? flags). POLYTXT_LIGHTMAP is default. This function is guaranteed not to do anything if the type is already correct. |
|
Update vertex lighting for this polygon.
Only works if the polygon uses gouraud shading or is flat-shaded. 'dynamic' is true for a dynamic light. 'reset' is true if the light values need to be reset to 0. 'lcol' is the color of the light. It is given seperately because the color of the light may be modified by portals and other effects. |