crystalspace.jbind.interfaces.iengine.mesh
Interface iMeshWrapper

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csMeshWrapper

public interface iMeshWrapper
extends iBase

A mesh wrapper is an engine-level object that wraps around an actual mesh object.

Author:
Quentin Anciaux
See Also:
iMeshObject

Method Summary
 void addMeshToStaticLOD(int lod, iMeshWrapper mesh)
          Set a given child mesh at a specific lod level.
 void castHardwareShadow(boolean castShadow)
          Enable/disable hardware based shadows alltogheter.
 iLODControl createStaticLOD()
          Create a LOD control for this mesh wrapper.
 void deferUpdateLighting(int flags, int num_lights)
          Update lighting as soon as the object becomes visible.
 void destroyStaticLOD()
          Destroy the LOD control for this mesh.
 void draw(iRenderView rview)
          Draw this mesh.
 void drawLight(iRenderView rview, iLight light)
          Draws the diffuse light mesh object.
 void drawShadow(iRenderView rview, iLight light)
          Draws the shadow buffer pass.
 iMeshList getChildren()
          Get all the children of this mesh object.
 boolean getDrawAfterShadow()
          Get if the meshobject is rendered after all fancy HW-shadow-stuff.
 iMeshDrawCallback getDrawCallback(int idx)
          Get the specified draw callback.
 int getDrawCallbackCount()
          Get the number of draw callbacks.
 iMeshFactoryWrapper getFactory()
          Get the parent factory.
 csFlags getFlags()
          Get flags for this meshwrapper.
 iLightingInfo getLightingInfo()
          Get the optional lighting information that is implemented by this mesh object.
 iMeshObject getMeshObject()
          Get the iMeshObject.
 iMovable getMovable()
          Get the movable instance for this object.
 iMeshWrapper getParentContainer()
          Get the parent of this mesh.
 iPortalContainer getPortalContainer()
          If this mesh is a portal container you can use GetPortalContainer() to get the portal container interface.
 void getRadius(csVector3 rad, csVector3 cent)
          Get the radius of this mesh and all its children.
 csRenderMesh[] getRenderMeshes(int n)
          Returns the render mesh.
 long getRenderPriority()
          Get the render priority.
 float getScreenBoundingBox(iCamera camera, csBox2 sbox, csBox3 cbox)
          Get a very inaccurate bounding box of the object in screen space.
 iShadowReceiver getShadowReceiver()
          Get the optional shadow receiver that is implemented by this mesh object.
 iLODControl getStaticLOD()
          Get the LOD control for this mesh.
 void getTransformedBoundingBox(csReversibleTransform trans, csBox3 cbox)
          Get the bounding box of this object after applying a transformation to it.
 int getVisibilityNumber()
          Optimization to avoid having to do SCF_QUERY_INTERFACE for iVisibilityObject.
 void getWorldBoundingBox(csBox3 cbox)
          Get the bounding box of this object in world space.
 int getZBufMode()
          Get the Z-buf drawing mode.
 void hardTransform(csReversibleTransform t)
          Do a hard transform of this object.
 boolean hitBeam(csVector3 start, csVector3 end, csVector3 isect, float pr)
          Check if this object is hit by this world space vector.
 boolean hitBeamBBox(csVector3 start, csVector3 end, csVector3 isect, float pr)
          Check if this mesh is hit by this object space vector.
 boolean hitBeamObject(csVector3 start, csVector3 end, csVector3 isect, float pr)
          Check if this object is hit by this object space vector.
 boolean hitBeamObject(csVector3 start, csVector3 end, csVector3 isect, float pr, int polygon_idx)
          Check if this object is hit by this object space vector.
 boolean hitBeamOutline(csVector3 start, csVector3 end, csVector3 isect, float pr)
          Check if this object is hit by this object space vector.
 void placeMesh()
          This routine will find out in which sectors a mesh object is positioned.
 iObject queryObject()
          Get the iObject for this mesh object.
 void removeDrawCallback(iMeshDrawCallback cb)
          Remove a draw callback.
 void removeMeshFromStaticLOD(iMeshWrapper mesh)
          Remove a child mesh from all lod levels.
 void setDrawAfterShadow(boolean drawAfter)
          Sets so that the meshobject is rendered after all fancy HW-shadow-stuff.
 void setDrawCallback(iMeshDrawCallback cb)
          Set a callback which is called just before the object is drawn.
 void setFactory(iMeshFactoryWrapper factory)
          Set the parent factory (this only sets a pointer).
 void setMeshObject(iMeshObject obj)
          Set the iMeshObject.
 void setParentContainer(iMeshWrapper obj)
          Set the parent of this mesh.
 void setRenderPriority(long rp)
          The renderer will render all objects in a sector based on this number.
 void setZBufMode(int mode)
          Set the Z-buf drawing mode to use for this object.
 void updateLighting(iLight[] lights, int num_lights)
          Light object according to the given array of lights (i.e.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Method Detail

queryObject

public iObject queryObject()
Get the iObject for this mesh object.

Returns:

getMeshObject

public iMeshObject getMeshObject()
Get the iMeshObject.

Returns:

setMeshObject

public void setMeshObject(iMeshObject obj)
Set the iMeshObject.

Parameters:
obj -

getPortalContainer

public iPortalContainer getPortalContainer()
If this mesh is a portal container you can use GetPortalContainer() to get the portal container interface.

Returns:

getLightingInfo

public iLightingInfo getLightingInfo()
Get the optional lighting information that is implemented by this mesh object.

Returns:

getShadowReceiver

public iShadowReceiver getShadowReceiver()
Get the optional shadow receiver that is implemented by this mesh object.

Returns:

getVisibilityNumber

public int getVisibilityNumber()
Optimization to avoid having to do SCF_QUERY_INTERFACE for iVisibilityObject.

Returns:

getFactory

public iMeshFactoryWrapper getFactory()
Get the parent factory.

Returns:

setFactory

public void setFactory(iMeshFactoryWrapper factory)
Set the parent factory (this only sets a pointer).

Parameters:
factory -

deferUpdateLighting

public void deferUpdateLighting(int flags,
                                int num_lights)
Update lighting as soon as the object becomes visible.

Parameters:
flags -
num_lights -

updateLighting

public void updateLighting(iLight[] lights,
                           int num_lights)
Light object according to the given array of lights (i.e.

Parameters:
lights -
num_lights -

getMovable

public iMovable getMovable()
Get the movable instance for this object.

Returns:

placeMesh

public void placeMesh()
This routine will find out in which sectors a mesh object is positioned.


hitBeamBBox

public boolean hitBeamBBox(csVector3 start,
                           csVector3 end,
                           csVector3 isect,
                           float pr)
Check if this mesh is hit by this object space vector.

Parameters:
start -
end -
isect -
pr -
Returns:

hitBeamOutline

public boolean hitBeamOutline(csVector3 start,
                              csVector3 end,
                              csVector3 isect,
                              float pr)
Check if this object is hit by this object space vector.

Parameters:
start -
end -
isect -
pr -
Returns:

hitBeamObject

public boolean hitBeamObject(csVector3 start,
                             csVector3 end,
                             csVector3 isect,
                             float pr)
Check if this object is hit by this object space vector.

Parameters:
start -
end -
isect -
pr -
Returns:

hitBeamObject

public boolean hitBeamObject(csVector3 start,
                             csVector3 end,
                             csVector3 isect,
                             float pr,
                             int polygon_idx)
Check if this object is hit by this object space vector.

Parameters:
start -
end -
isect -
pr -
polygon_idx -
Returns:

hitBeam

public boolean hitBeam(csVector3 start,
                       csVector3 end,
                       csVector3 isect,
                       float pr)
Check if this object is hit by this world space vector.

Parameters:
start -
end -
isect -
pr -
Returns:

setDrawCallback

public void setDrawCallback(iMeshDrawCallback cb)
Set a callback which is called just before the object is drawn.

Parameters:
cb -

removeDrawCallback

public void removeDrawCallback(iMeshDrawCallback cb)
Remove a draw callback.

Parameters:
cb -

getDrawCallbackCount

public int getDrawCallbackCount()
Get the number of draw callbacks.

Returns:

getDrawCallback

public iMeshDrawCallback getDrawCallback(int idx)
Get the specified draw callback.

Parameters:
idx -
Returns:

setRenderPriority

public void setRenderPriority(long rp)
The renderer will render all objects in a sector based on this number.

Parameters:
rp -

getRenderPriority

public long getRenderPriority()
Get the render priority.

Returns:

getFlags

public csFlags getFlags()
Get flags for this meshwrapper.

Returns:

setZBufMode

public void setZBufMode(int mode)
Set the Z-buf drawing mode to use for this object.

Parameters:
mode -

getZBufMode

public int getZBufMode()
Get the Z-buf drawing mode.

Returns:

hardTransform

public void hardTransform(csReversibleTransform t)
Do a hard transform of this object.

Parameters:
t -

getWorldBoundingBox

public void getWorldBoundingBox(csBox3 cbox)
Get the bounding box of this object in world space.

Parameters:
cbox -

getTransformedBoundingBox

public void getTransformedBoundingBox(csReversibleTransform trans,
                                      csBox3 cbox)
Get the bounding box of this object after applying a transformation to it.

Parameters:
trans -
cbox -

getScreenBoundingBox

public float getScreenBoundingBox(iCamera camera,
                                  csBox2 sbox,
                                  csBox3 cbox)
Get a very inaccurate bounding box of the object in screen space.

Parameters:
camera -
sbox -
cbox -
Returns:

getChildren

public iMeshList getChildren()
Get all the children of this mesh object.

Returns:

getParentContainer

public iMeshWrapper getParentContainer()
Get the parent of this mesh.

Returns:

setParentContainer

public void setParentContainer(iMeshWrapper obj)
Set the parent of this mesh.

Parameters:
obj -

getRadius

public void getRadius(csVector3 rad,
                      csVector3 cent)
Get the radius of this mesh and all its children.

Parameters:
rad -
cent -

draw

public void draw(iRenderView rview)
Draw this mesh.

Parameters:
rview -

createStaticLOD

public iLODControl createStaticLOD()
Create a LOD control for this mesh wrapper.

Returns:

destroyStaticLOD

public void destroyStaticLOD()
Destroy the LOD control for this mesh.


getStaticLOD

public iLODControl getStaticLOD()
Get the LOD control for this mesh.

Returns:

addMeshToStaticLOD

public void addMeshToStaticLOD(int lod,
                               iMeshWrapper mesh)
Set a given child mesh at a specific lod level.

Parameters:
lod -
mesh -

removeMeshFromStaticLOD

public void removeMeshFromStaticLOD(iMeshWrapper mesh)
Remove a child mesh from all lod levels.

Parameters:
mesh -

getRenderMeshes

public csRenderMesh[] getRenderMeshes(int n)
Returns the render mesh.

Parameters:
n -
Returns:

drawShadow

public void drawShadow(iRenderView rview,
                       iLight light)
Draws the shadow buffer pass.

Parameters:
rview -
light -

drawLight

public void drawLight(iRenderView rview,
                      iLight light)
Draws the diffuse light mesh object.

Parameters:
rview -
light -

castHardwareShadow

public void castHardwareShadow(boolean castShadow)
Enable/disable hardware based shadows alltogheter.

Parameters:
castShadow -

setDrawAfterShadow

public void setDrawAfterShadow(boolean drawAfter)
Sets so that the meshobject is rendered after all fancy HW-shadow-stuff.

Parameters:
drawAfter -

getDrawAfterShadow

public boolean getDrawAfterShadow()
Get if the meshobject is rendered after all fancy HW-shadow-stuff.

Returns: