CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iThingFactoryState Struct Reference

This is the state interface to access the internals of a thing mesh factory. More...

#include <thing.h>

Inheritance diagram for iThingFactoryState:

iBase List of all members.

Public Methods

virtual void * GetPrivateObject ()=0
 @ UGLY. More...

virtual void CompressVertices ()=0
 Compress the vertex table so that all nearly identical vertices are compressed. More...

virtual int GetPolygonCount ()=0
 Query number of polygons in this thing. More...

virtual iPolygon3DStatic * GetPolygon (int idx)=0
 Get a polygon from set by his index. More...

virtual iPolygon3DStatic * GetPolygon (const char *name)=0
 Get a polygon from set by name. More...

virtual iPolygon3DStatic * CreatePolygon (const char *iName=NULL)=0
 Create a new polygon and return a pointer to it. More...

virtual int FindPolygonIndex (iPolygon3DStatic *polygon) const=0
 Find the index for a polygon. Returns -1 if polygon cannot be found. More...

virtual void RemovePolygon (int idx)=0
 Delete a polygon given an index. More...

virtual void RemovePolygons ()=0
 Delete all polygons. More...

virtual int GetPortalCount () const=0
 Query number of portals in this thing. More...

virtual iPortal * GetPortal (int idx) const=0
 Get a portal. More...

virtual iPolygon3DStatic * GetPortalPolygon (int idx) const=0
 Get the polygon for the given portal (with index). More...

virtual int GetVertexCount () const=0
 Query number of vertices in set. More...

virtual const csVector3 & GetVertex (int idx) const=0
 Get the given vertex coordinates in object space. More...

virtual const csVector3 * GetVertices () const=0
 Get the vertex coordinates in object space. More...

virtual int CreateVertex (const csVector3 &vt)=0
 Create a vertex given his object-space coords and return his index. More...

virtual void SetVertex (int idx, const csVector3 &vt)=0
 Set the object space vertices for a given vertex. More...

virtual void DeleteVertex (int idx)=0
 Delete a vertex. More...

virtual void DeleteVertices (int from, int to)=0
 Delete a range of vertices (inclusive). More...

virtual csFlags & GetFlags ()=0
 Set thing flags (see CS_THING_... values above). More...

virtual iPolygon3DStatic * IntersectSegment (const csVector3 &start, const csVector3 &end, csVector3 &isect, float *pr=NULL, bool only_portals=false)=0
 Intersect a segment with this thing and return the first polygon that is hit. More...

virtual void SetSmoothingFlag (bool smoothing)=0
 Sets the smoothing flag. More...

virtual bool GetSmoothingFlag ()=0
 Gets the smoothing flag. More...

virtual csVector3 * GetNormals ()=0
 Gets the normals. More...

virtual float GetCosinusFactor () const=0
 Get cosinus factor. More...

virtual void SetCosinusFactor (float cosfact)=0
 Set cosinus factor. More...


Detailed Description

This is the state interface to access the internals of a thing mesh factory.

Definition at line 66 of file thing.h.


Member Function Documentation

virtual void iThingFactoryState::CompressVertices (    )  [pure virtual]
 

Compress the vertex table so that all nearly identical vertices are compressed.

The polygons in the set are automatically adapted. This function can be called at any time in the creation of the object and it can be called multiple time but it normally only makes sense to call this function after you have finished adding all polygons and all vertices.

Note that calling this function will make the camera vertex array invalid.

virtual iPolygon3DStatic* iThingFactoryState::CreatePolygon (  const char *    iName = NULL )  [pure virtual]
 

Create a new polygon and return a pointer to it.

virtual int iThingFactoryState::CreateVertex (  const csVector3 &    vt )  [pure virtual]
 

Create a vertex given his object-space coords and return his index.

virtual void iThingFactoryState::DeleteVertex (  int    idx )  [pure virtual]
 

Delete a vertex.

Warning this will invalidate all polygons that use vertices after this vertex because their vertex indices will no longer be ok.

virtual void iThingFactoryState::DeleteVertices (  int    from,
int    to
)  [pure virtual]
 

Delete a range of vertices (inclusive).

Warning this will invalidate all polygons that use vertices after these vertices because their vertex indices will no longer be ok. This function does bounds-checking so an easy way to delete all vertices is DeleteVertices(0,1000000000).

virtual int iThingFactoryState::FindPolygonIndex (  iPolygon3DStatic *    polygon )  const [pure virtual]
 

Find the index for a polygon. Returns -1 if polygon cannot be found.

virtual float iThingFactoryState::GetCosinusFactor (    )  const [pure virtual]
 

Get cosinus factor.

virtual csFlags& iThingFactoryState::GetFlags (    )  [pure virtual]
 

Set thing flags (see CS_THING_... values above).

virtual csVector3* iThingFactoryState::GetNormals (    )  [pure virtual]
 

Gets the normals.

virtual iPolygon3DStatic* iThingFactoryState::GetPolygon (  const char *    name )  [pure virtual]
 

Get a polygon from set by name.

virtual iPolygon3DStatic* iThingFactoryState::GetPolygon (  int    idx )  [pure virtual]
 

Get a polygon from set by his index.

virtual int iThingFactoryState::GetPolygonCount (    )  [pure virtual]
 

Query number of polygons in this thing.

virtual iPortal* iThingFactoryState::GetPortal (  int    idx )  const [pure virtual]
 

Get a portal.

virtual int iThingFactoryState::GetPortalCount (    )  const [pure virtual]
 

Query number of portals in this thing.

virtual iPolygon3DStatic* iThingFactoryState::GetPortalPolygon (  int    idx )  const [pure virtual]
 

Get the polygon for the given portal (with index).

virtual void* iThingFactoryState::GetPrivateObject (    )  [pure virtual]
 

@ UGLY.

@

virtual bool iThingFactoryState::GetSmoothingFlag (    )  [pure virtual]
 

Gets the smoothing flag.

virtual const csVector3& iThingFactoryState::GetVertex (  int    idx )  const [pure virtual]
 

Get the given vertex coordinates in object space.

virtual int iThingFactoryState::GetVertexCount (    )  const [pure virtual]
 

Query number of vertices in set.

virtual const csVector3* iThingFactoryState::GetVertices (    )  const [pure virtual]
 

Get the vertex coordinates in object space.

virtual iPolygon3DStatic* iThingFactoryState::IntersectSegment (  const csVector3 &    start,
const csVector3 &    end,
csVector3 &    isect,
float *    pr = NULL,
bool    only_portals = false
)  [pure virtual]
 

Intersect a segment with this thing and return the first polygon that is hit.

If only_portals == true then only portals will be checked.

virtual void iThingFactoryState::RemovePolygon (  int    idx )  [pure virtual]
 

Delete a polygon given an index.

virtual void iThingFactoryState::RemovePolygons (    )  [pure virtual]
 

Delete all polygons.

virtual void iThingFactoryState::SetCosinusFactor (  float    cosfact )  [pure virtual]
 

Set cosinus factor.

This cosinus factor controls how lighting affects the polygons relative to the angle. If no value is set here then the default is used.

virtual void iThingFactoryState::SetSmoothingFlag (  bool    smoothing )  [pure virtual]
 

Sets the smoothing flag.

virtual void iThingFactoryState::SetVertex (  int    idx,
const csVector3 &    vt
)  [pure virtual]
 

Set the object space vertices for a given vertex.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14