crystalspace.jbind.impl.mesh.thing
Class csThingFactoryState

java.lang.Object
  extended bycrystalspace.jbind.impl.csNativeObject
      extended bycrystalspace.jbind.impl.csutil.scf.csBase
          extended bycrystalspace.jbind.impl.mesh.thing.csThingFactoryState
All Implemented Interfaces:
iBase, iPointer, iThingFactoryState

public class csThingFactoryState
extends csBase
implements iThingFactoryState

Author:
qan To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments

Field Summary
 
Fields inherited from class crystalspace.jbind.impl.csNativeObject
ImplFactory, nPointer
 
Constructor Summary
csThingFactoryState(iPointer nPointer)
           
 
Method Summary
 int addEmptyPolygon()
          Add an empty polygon.
 int addInsideBox(csVector3 bmin, csVector3 bmax)
          Add a box that can be seen from the inside.
 int addOutsideBox(csVector3 bmin, csVector3 bmax)
          Add a box that can be seen from the outside.
 int addPolygon(csVector3[] vertices, int num)
          Add a general polygon.
 void addPolygonVertex(csPolygonRange range, csVector3 vt)
          Add a vertex to all polygons in the given range.
 void addPolygonVertex(csPolygonRange range, int vt)
          Add a vertex index to all polygons in the given range.
 int addQuad(csVector3 v1, csVector3 v2, csVector3 v3, csVector3 v4)
          Add a quad.
 int addTriangle(csVector3 v1, csVector3 v2, csVector3 v3)
          Add a triangle.
 void compressVertices()
          Compress the vertex table so that all nearly identical vertices are compressed.
 iPolygonHandle createPolygonHandle(int polygon_idx)
          Create a polygon handle that can be used to refer to some polygon.
 int createVertex(csVector3 vt)
          Create a vertex given his object-space coords and return his index.
 void deleteVertex(int idx)
          Delete a vertex.
 void deleteVertices(int from, int to)
          Delete a range of vertices (inclusive);.
 int findPolygonByName(java.lang.String name)
          Find a polygon index with a name.
 float getCosinusFactor()
          Get cosinus factor.
 csFlags getFlags()
          Set thing flags (see CS_THING_... values above);.
static java.lang.Class getInterfaceClass()
           
static java.lang.String getInterfaceName()
           
static int getInterfaceVersion()
           
 java.lang.String getName()
          Return the name of the interface
 csVector3[] getNormals()
          Gets the normals.
 int getPolygonCount()
          Query number of polygons in this thing.
 csFlags getPolygonFlags(int polygon_idx)
          Get the flags of the specified polygon.
 iMaterialWrapper getPolygonMaterial(int polygon_idx)
          Get the material for the specified polygon.
 java.lang.String getPolygonName(int polygon_idx)
          Get the name of the specified polygon.
 csPlane3 getPolygonObjectPlane(int polygon_idx)
          Get object space plane of the specified polygon.
 void getPolygonTextureMapping(int polygon_idx, csMatrix3 m, csVector3 v)
          Get the texture space information for the specified polygon.
 csVector3 getPolygonVertex(int polygon_idx, int vertex_idx)
          Get a vertex from a polygon.
 int getPolygonVertexCount(int polygon_idx)
          Get number of vertices for polygon.
 int[] getPolygonVertexIndices(int polygon_idx)
          Get table with vertex indices from polygon.
 boolean getSmoothingFlag()
          Gets the smoothing flag.
 int getVersion()
          Return the version of the interface
 csVector3 getVertex(int idx)
          Get the given vertex coordinates in object space.
 int getVertexCount()
          Query number of vertices in set.
 csVector3[] getVertices()
          Get the vertex coordinates in object space.
static void initSCF()
           
protected  boolean isNativePointerValidSafe()
           
 boolean isPolygonTextureMappingEnabled(int polygon_idx)
          Check if texture mapping is enabled for the specified polygon.
 boolean isPolygonTransparent(int polygon_idx)
          Return true if this polygon or the texture it uses is transparent.
 boolean pointOnPolygon(int polygon_idx, csVector3 v)
          Return true if an object space point is on (or very nearly on); the given polygon.
 void removePolygon(int idx)
          Delete a polygon given an index.
 void removePolygons()
          Delete all polygons.
 void resetPolygonFlags(csPolygonRange range, int flags)
          Reset the given flags to all polygons in the range.
 void setCosinusFactor(float cosfact)
          Set cosinus factor.
 void setPolygonFlags(csPolygonRange range, int flags)
          Set the given flags to all polygons in the range.
 void setPolygonFlags(csPolygonRange range, int mask, int flags)
          Set the given flags to all polygons in the range.
 void setPolygonMaterial(csPolygonRange range, iMaterialWrapper material)
          Set the material of all polygons in the given range.
 void setPolygonName(csPolygonRange range, java.lang.String name)
          Set the name of all polygons in the given range.
 void setPolygonTextureMapping(csPolygonRange range, csMatrix3 m, csVector3 v)
          Set texture mapping of all polygons in the given range to use the transform.
 void setPolygonTextureMapping(csPolygonRange range, csVector2 uv1, csVector2 uv2, csVector2 uv3)
          Set texture mapping of all polygons in the given range to use the given uv coordinates for the first three vertices of every polygon.
 void setPolygonTextureMapping(csPolygonRange range, csVector3 p1, csVector2 uv1, csVector3 p2, csVector2 uv2, csVector3 p3, csVector2 uv3)
          Set texture mapping of all polygons in the given range to use the given uv coordinates for the specified three vertices of every polygon.
 void setPolygonTextureMapping(csPolygonRange range, csVector3 v_orig, csVector3 v1, float len1)
          Set texture mapping of all polygons in the given range to use the texture mapping as specified by two vertices on the polygon.
 void setPolygonTextureMapping(csPolygonRange range, csVector3 v_orig, csVector3 v1, float len1, csVector3 v2, float len2)
          Set texture mapping of all polygons in the given range to use the texture mapping as specified by two vertices on the polygon.
 void setPolygonTextureMapping(csPolygonRange range, float len1)
          Set texture mapping of all polygons in the given range to use the texture mapping as specified by the two first vertices on the polygon.
 void setPolygonTextureMappingEnabled(csPolygonRange range, boolean enabled)
          Disable or enable texture mapping for the range of polygons.
 void setPolygonVertexIndices(csPolygonRange range, int num, int[] indices)
          Set the given polygon index table for all polygons in the given range.
 void setSmoothingFlag(boolean smoothing)
          Sets the smoothing flag.
 void setVertex(int idx, csVector3 vt)
          Set the object space vertices for a given vertex.
 
Methods inherited from class crystalspace.jbind.impl.csutil.scf.csBase
decRef, equals, finalize, getRefCount, incRef, nDelete, queryInterface, queryInterfaceSafe
 
Methods inherited from class crystalspace.jbind.impl.csNativeObject
changePointer, getPointer, getPointer, getPointerArray, hashCode, isMemoryOwner, isNativePointerValid, isNativePointerValidSafe, newNativeObject, setMemoryOwner, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getRefCount, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Constructor Detail

csThingFactoryState

public csThingFactoryState(iPointer nPointer)
Parameters:
nPointer -
Method Detail

getVersion

public int getVersion()
Description copied from interface: iBase
Return the version of the interface

Specified by:
getVersion in interface iBase
Specified by:
getVersion in class csBase

getName

public java.lang.String getName()
Description copied from interface: iBase
Return the name of the interface

Specified by:
getName in interface iBase
Specified by:
getName in class csBase

initSCF

public static void initSCF()

addInsideBox

public int addInsideBox(csVector3 bmin,
                        csVector3 bmax)
Description copied from interface: iThingFactoryState
Add a box that can be seen from the inside. This will add six polygons. By default the texture mapping is set so that the texture is aligned on the u-axis with the 'v1'-'v2' vector and the scale is set so that the texture tiles once for every unit (i.e. if you have the vertices v1 and v2 are 5 units separated from each other then the texture will repeat exactly five times between v1 and v2);. Returns: the index of the first created polygon. Implemented in csThingStatic.

Specified by:
addInsideBox in interface iThingFactoryState
Parameters:
bmin -
bmax -
Returns:

setPolygonMaterial

public void setPolygonMaterial(csPolygonRange range,
                               iMaterialWrapper material)
Description copied from interface: iThingFactoryState
Set the material of all polygons in the given range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonMaterial in interface iThingFactoryState
Parameters:
range -
material -

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     float len1)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the texture mapping as specified by the two first vertices on 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 polygons 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 the two first vertices. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
len1 -

getInterfaceVersion

public static int getInterfaceVersion()

getInterfaceName

public static java.lang.String getInterfaceName()

getInterfaceClass

public static java.lang.Class getInterfaceClass()

isNativePointerValidSafe

protected boolean isNativePointerValidSafe()

addEmptyPolygon

public int addEmptyPolygon()
Description copied from interface: iThingFactoryState
Add an empty polygon. Returns: the index of the created polygon. Implemented in csThingStatic.

Specified by:
addEmptyPolygon in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.addEmptyPolygon()

addOutsideBox

public int addOutsideBox(csVector3 bmin,
                         csVector3 bmax)
Description copied from interface: iThingFactoryState
Add a box that can be seen from the outside. This will add six polygons. By default the texture mapping is set so that the texture is aligned on the u-axis with the 'v1'-'v2' vector and the scale is set so that the texture tiles once for every unit (i.e. if you have the vertices v1 and v2 are 5 units separated from each other then the texture will repeat exactly five times between v1 and v2);. Returns: the index of the first created polygon. Implemented in csThingStatic.

Specified by:
addOutsideBox in interface iThingFactoryState
Parameters:
bmin -
bmax -
Returns:
See Also:
iThingFactoryState.addOutsideBox(crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3)

addPolygon

public int addPolygon(csVector3[] vertices,
                      int num)
Description copied from interface: iThingFactoryState
Add a general polygon. By default the texture mapping is set so that the texture is aligned on the u-axis with the 'v1'-'v2' vector and the scale is set so that the texture tiles once for every unit (i.e. if you have the vertices v1 and v2 are 5 units separated from each other then the texture will repeat exactly five times between v1 and v2);. Returns: the index of the created polygon. Implemented in csThingStatic.

Specified by:
addPolygon in interface iThingFactoryState
Parameters:
vertices -
num -
Returns:
See Also:
iThingFactoryState.addPolygon(crystalspace.jbind.impl.csgeom.vector3.csVector3[], int)

addPolygonVertex

public void addPolygonVertex(csPolygonRange range,
                             csVector3 vt)
Description copied from interface: iThingFactoryState
Add a vertex to all polygons in the given range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
addPolygonVertex in interface iThingFactoryState
Parameters:
range -
vt -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#addPolygonVertex(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.vector3.csVector3)

addPolygonVertex

public void addPolygonVertex(csPolygonRange range,
                             int vt)
Description copied from interface: iThingFactoryState
Add a vertex index to all polygons in the given range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
addPolygonVertex in interface iThingFactoryState
Parameters:
range -
vt -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#addPolygonVertex(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, int)

addQuad

public int addQuad(csVector3 v1,
                   csVector3 v2,
                   csVector3 v3,
                   csVector3 v4)
Description copied from interface: iThingFactoryState
Add a quad. Note that quads are the most optimal kind of polygon for a thing so you should try to use these as much as possible. By default the texture mapping is set so that the texture is aligned on the u-axis with the 'v1'-'v2' vector and the scale is set so that the texture tiles once for every unit (i.e. if you have the vertices v1 and v2 are 5 units separated from each other then the texture will repeat exactly five times between v1 and v2);. Returns: the index of the created polygon. Implemented in csThingStatic.

Specified by:
addQuad in interface iThingFactoryState
Parameters:
v1 -
v2 -
v3 -
v4 -
Returns:
See Also:
iThingFactoryState.addQuad(crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3)

addTriangle

public int addTriangle(csVector3 v1,
                       csVector3 v2,
                       csVector3 v3)
Description copied from interface: iThingFactoryState
Add a triangle. By default the texture mapping is set so that the texture is aligned on the u-axis with the 'v1'-'v2' vector and the scale is set so that the texture tiles once for every unit (i.e. if you have the vertices v1 and v2 are 5 units separated from each other then the texture will repeat exactly five times between v1 and v2);. Returns: the index of the created polygon. Implemented in csThingStatic.

Specified by:
addTriangle in interface iThingFactoryState
Parameters:
v1 -
v2 -
v3 -
Returns:
See Also:
iThingFactoryState.addTriangle(crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3)

compressVertices

public void compressVertices()
Description copied from interface: iThingFactoryState
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. Implemented in csThingStatic.

Specified by:
compressVertices in interface iThingFactoryState
See Also:
iThingFactoryState.compressVertices()

createPolygonHandle

public iPolygonHandle createPolygonHandle(int polygon_idx)
Description copied from interface: iThingFactoryState
Create a polygon handle that can be used to refer to some polygon. This can be useful in situations where an SCF handle is required to be able to reference a polygon. The thing will not keep a reference to this handle so you are fully responsible for it after calling this function. The polygon handle created here will not have a mesh object or thing state set since it is created from the factory. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
createPolygonHandle in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.createPolygonHandle(int)

createVertex

public int createVertex(csVector3 vt)
Description copied from interface: iThingFactoryState
Create a vertex given his object-space coords and return his index. Implemented in csThingStatic.

Specified by:
createVertex in interface iThingFactoryState
Parameters:
vt -
Returns:
See Also:
iThingFactoryState.createVertex(crystalspace.jbind.impl.csgeom.vector3.csVector3)

deleteVertex

public void deleteVertex(int idx)
Description copied from interface: iThingFactoryState
Delete a vertex. Warning this will invalidate all polygons that use vertices after this vertex because their vertex indices will no longer be ok. Implemented in csThingStatic.

Specified by:
deleteVertex in interface iThingFactoryState
Parameters:
idx -
See Also:
iThingFactoryState.deleteVertex(int)

deleteVertices

public void deleteVertices(int from,
                           int to)
Description copied from interface: iThingFactoryState
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);. Implemented in csThingStatic.

Specified by:
deleteVertices in interface iThingFactoryState
Parameters:
from -
to -
See Also:
iThingFactoryState.deleteVertices(int, int)

findPolygonByName

public int findPolygonByName(java.lang.String name)
Description copied from interface: iThingFactoryState
Find a polygon index with a name. Implemented in csThingStatic.

Specified by:
findPolygonByName in interface iThingFactoryState
Parameters:
name -
Returns:
See Also:
iThingFactoryState.findPolygonByName(java.lang.String)

getCosinusFactor

public float getCosinusFactor()
Description copied from interface: iThingFactoryState
Get cosinus factor. Implemented in csThingStatic.

Specified by:
getCosinusFactor in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getCosinusFactor()

getFlags

public csFlags getFlags()
Description copied from interface: iThingFactoryState
Set thing flags (see CS_THING_... values above);. Implemented in csThingStatic.

Specified by:
getFlags in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getFlags()

getNormals

public csVector3[] getNormals()
Description copied from interface: iThingFactoryState
Gets the normals. Implemented in csThingStatic.

Specified by:
getNormals in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getNormals()

getPolygonCount

public int getPolygonCount()
Description copied from interface: iThingFactoryState
Query number of polygons in this thing. Implemented in csThingStatic.

Specified by:
getPolygonCount in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getPolygonCount()

getPolygonFlags

public csFlags getPolygonFlags(int polygon_idx)
Description copied from interface: iThingFactoryState
Get the flags of the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonFlags in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonFlags(int)

getPolygonMaterial

public iMaterialWrapper getPolygonMaterial(int polygon_idx)
Description copied from interface: iThingFactoryState
Get the material for the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonMaterial in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonMaterial(int)

getPolygonName

public java.lang.String getPolygonName(int polygon_idx)
Description copied from interface: iThingFactoryState
Get the name of the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonName in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonName(int)

getPolygonObjectPlane

public csPlane3 getPolygonObjectPlane(int polygon_idx)
Description copied from interface: iThingFactoryState
Get object space plane of the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonObjectPlane in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonObjectPlane(int)

getPolygonTextureMapping

public void getPolygonTextureMapping(int polygon_idx,
                                     csMatrix3 m,
                                     csVector3 v)
Description copied from interface: iThingFactoryState
Get the texture space information for the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonTextureMapping in interface iThingFactoryState
Parameters:
polygon_idx -
m -
v -
See Also:
iThingFactoryState.getPolygonTextureMapping(int, crystalspace.jbind.impl.csgeom.matrix3.csMatrix3, crystalspace.jbind.impl.csgeom.vector3.csVector3)

getPolygonVertex

public csVector3 getPolygonVertex(int polygon_idx,
                                  int vertex_idx)
Description copied from interface: iThingFactoryState
Get a vertex from a polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonVertex in interface iThingFactoryState
Parameters:
polygon_idx -
vertex_idx -
Returns:
See Also:
iThingFactoryState.getPolygonVertex(int, int)

getPolygonVertexCount

public int getPolygonVertexCount(int polygon_idx)
Description copied from interface: iThingFactoryState
Get number of vertices for polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonVertexCount in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonVertexCount(int)

getPolygonVertexIndices

public int[] getPolygonVertexIndices(int polygon_idx)
Description copied from interface: iThingFactoryState
Get table with vertex indices from polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
getPolygonVertexIndices in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.getPolygonVertexIndices(int)

getSmoothingFlag

public boolean getSmoothingFlag()
Description copied from interface: iThingFactoryState
Gets the smoothing flag. Implemented in csThingStatic.

Specified by:
getSmoothingFlag in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getSmoothingFlag()

getVertex

public csVector3 getVertex(int idx)
Description copied from interface: iThingFactoryState
Get the given vertex coordinates in object space. Implemented in csThingStatic.

Specified by:
getVertex in interface iThingFactoryState
Parameters:
idx -
Returns:
See Also:
iThingFactoryState.getVertex(int)

getVertexCount

public int getVertexCount()
Description copied from interface: iThingFactoryState
Query number of vertices in set. Implemented in csThingStatic.

Specified by:
getVertexCount in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getVertexCount()

getVertices

public csVector3[] getVertices()
Description copied from interface: iThingFactoryState
Get the vertex coordinates in object space. Implemented in csThingStatic.

Specified by:
getVertices in interface iThingFactoryState
Returns:
See Also:
iThingFactoryState.getVertices()

isPolygonTextureMappingEnabled

public boolean isPolygonTextureMappingEnabled(int polygon_idx)
Description copied from interface: iThingFactoryState
Check if texture mapping is enabled for the specified polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
isPolygonTextureMappingEnabled in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.isPolygonTextureMappingEnabled(int)

isPolygonTransparent

public boolean isPolygonTransparent(int polygon_idx)
Description copied from interface: iThingFactoryState
Return true if this polygon or the texture it uses is transparent. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
isPolygonTransparent in interface iThingFactoryState
Parameters:
polygon_idx -
Returns:
See Also:
iThingFactoryState.isPolygonTransparent(int)

pointOnPolygon

public boolean pointOnPolygon(int polygon_idx,
                              csVector3 v)
Description copied from interface: iThingFactoryState
Return true if an object space point is on (or very nearly on); the given polygon. Parameters: polygon_idx is a polygon index or CS_POLYINDEX_LAST for last created polygon. Implemented in csThingStatic.

Specified by:
pointOnPolygon in interface iThingFactoryState
Parameters:
polygon_idx -
v -
Returns:
See Also:
iThingFactoryState.pointOnPolygon(int, crystalspace.jbind.impl.csgeom.vector3.csVector3)

removePolygon

public void removePolygon(int idx)
Description copied from interface: iThingFactoryState
Delete a polygon given an index. Implemented in csThingStatic.

Specified by:
removePolygon in interface iThingFactoryState
Parameters:
idx -
See Also:
iThingFactoryState.removePolygon(int)

removePolygons

public void removePolygons()
Description copied from interface: iThingFactoryState
Delete all polygons. Implemented in csThingStatic.

Specified by:
removePolygons in interface iThingFactoryState
See Also:
iThingFactoryState.removePolygons()

resetPolygonFlags

public void resetPolygonFlags(csPolygonRange range,
                              int flags)
Description copied from interface: iThingFactoryState
Reset the given flags to all polygons in the range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
resetPolygonFlags in interface iThingFactoryState
Parameters:
range -
flags -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#resetPolygonFlags(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, int)

setCosinusFactor

public void setCosinusFactor(float cosfact)
Description copied from interface: iThingFactoryState
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. Implemented in csThingStatic.

Specified by:
setCosinusFactor in interface iThingFactoryState
Parameters:
cosfact -
See Also:
iThingFactoryState.setCosinusFactor(float)

setPolygonFlags

public void setPolygonFlags(csPolygonRange range,
                            int mask,
                            int flags)
Description copied from interface: iThingFactoryState
Set the given flags to all polygons in the range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonFlags in interface iThingFactoryState
Parameters:
range -
mask -
flags -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonFlags(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, int, int)

setPolygonFlags

public void setPolygonFlags(csPolygonRange range,
                            int flags)
Description copied from interface: iThingFactoryState
Set the given flags to all polygons in the range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonFlags in interface iThingFactoryState
Parameters:
range -
flags -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonFlags(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, int)

setPolygonName

public void setPolygonName(csPolygonRange range,
                           java.lang.String name)
Description copied from interface: iThingFactoryState
Set the name of all polygons in the given range. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonName in interface iThingFactoryState
Parameters:
range -
name -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonName(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, java.lang.String)

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     csMatrix3 m,
                                     csVector3 v)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the transform. This function is usually not used by application code as it is complicated to specify texture mapping like this. It is recommended to use one of the other texture mapping routines. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
m -
v -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMapping(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.matrix3.csMatrix3, crystalspace.jbind.impl.csgeom.vector3.csVector3)

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     csVector2 uv1,
                                     csVector2 uv2,
                                     csVector2 uv3)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the given uv coordinates for the first three vertices of every polygon. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
uv1 -
uv2 -
uv3 -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMapping(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.vector2.csVector2, crystalspace.jbind.impl.csgeom.vector2.csVector2, crystalspace.jbind.impl.csgeom.vector2.csVector2)

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     csVector3 p1,
                                     csVector2 uv1,
                                     csVector3 p2,
                                     csVector2 uv2,
                                     csVector3 p3,
                                     csVector2 uv3)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the given uv coordinates for the specified three vertices of every polygon. Note that this function is only useful for polygon ranges that are on the same plane. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
p1 -
uv1 -
p2 -
uv2 -
p3 -
uv3 -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMapping(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector2.csVector2, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector2.csVector2, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector2.csVector2)

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     csVector3 v_orig,
                                     csVector3 v1,
                                     float len1,
                                     csVector3 v2,
                                     float len2)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the texture mapping as specified by two vertices on the polygon. The first vertex is seen as the origin, the second as the u-axis of the texture space coordinate system, and the third as the v-axis. The length of the u-axis and the v-axis is given with the 'len1' and 'len2' parameters. For example, if 'len1' is equal to 2 this means that texture will be tiled exactly two times between vertex 'v_orig' and 'v1'. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
v_orig -
v1 -
len1 -
v2 -
len2 -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMapping(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, float, crystalspace.jbind.impl.csgeom.vector3.csVector3, float)

setPolygonTextureMapping

public void setPolygonTextureMapping(csPolygonRange range,
                                     csVector3 v_orig,
                                     csVector3 v1,
                                     float len1)
Description copied from interface: iThingFactoryState
Set texture mapping of all polygons in the given range to use the texture mapping as specified by two vertices on 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 polygons 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'. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMapping in interface iThingFactoryState
Parameters:
range -
v_orig -
v1 -
len1 -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMapping(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, crystalspace.jbind.impl.csgeom.vector3.csVector3, crystalspace.jbind.impl.csgeom.vector3.csVector3, float)

setPolygonTextureMappingEnabled

public void setPolygonTextureMappingEnabled(csPolygonRange range,
                                            boolean enabled)
Description copied from interface: iThingFactoryState
Disable or enable texture mapping for the range of polygons. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonTextureMappingEnabled in interface iThingFactoryState
Parameters:
range -
enabled -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonTextureMappingEnabled(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, boolean)

setPolygonVertexIndices

public void setPolygonVertexIndices(csPolygonRange range,
                                    int num,
                                    int[] indices)
Description copied from interface: iThingFactoryState
Set the given polygon index table for all polygons in the given range. It is more optimal to call this routine as opposed to calling AddPolygonVertex(); all the time. Parameters: range is one of the CS_POLYRANGE defines to specify a polygon range. Implemented in csThingStatic.

Specified by:
setPolygonVertexIndices in interface iThingFactoryState
Parameters:
range -
num -
indices -
See Also:
crystalspace.jbind.interfaces.imesh.thing.iThingFactoryState#setPolygonVertexIndices(crystalspace.jbind.impl.engine.mesh.thing.csPolygonRange, int, int[])

setSmoothingFlag

public void setSmoothingFlag(boolean smoothing)
Description copied from interface: iThingFactoryState
Sets the smoothing flag. Implemented in csThingStatic.

Specified by:
setSmoothingFlag in interface iThingFactoryState
Parameters:
smoothing -
See Also:
iThingFactoryState.setSmoothingFlag(boolean)

setVertex

public void setVertex(int idx,
                      csVector3 vt)
Description copied from interface: iThingFactoryState
Set the object space vertices for a given vertex. Implemented in csThingStatic.

Specified by:
setVertex in interface iThingFactoryState
Parameters:
idx -
vt -
See Also:
iThingFactoryState.setVertex(int, crystalspace.jbind.impl.csgeom.vector3.csVector3)