CrystalSpace

Public API Reference

Crystal Space 3D Engine

Classes

struct  csFog
 Sector fog structure. More...
struct  csSectorHitBeamResult
 Return structure for the iSector::HitBeam() and iSector::HitBeamPortals() routines. More...
struct  csSectorVisibleRenderMeshes
 Container for render meshes for one mesh wrapper. More...
struct  iEngine
 This interface is the main interface to the 3D engine. More...
struct  iEngineFrameCallback
 A callback that will be fired whenever the engine starts drawing a frame. More...
struct  iEngineSectorCallback
 A callback that will be fired whenever a sector is created or removed from the engine. More...
struct  iImposterFactory
 iImposterFactory defines the interface a mesh factory must implement for its meshes to be used as imposters by the engine. More...
struct  iLightVisibleCallback
 A callback that is fired whenever a light is visible. More...
struct  iMeshGenerator
 iMeshGenerator defines the interface for a mesh generator. More...
struct  iMeshGeneratorGeometry
 This interface defines one piece of geometry for the mesh generator. More...
struct  iMovable
 This interface represents the position and orientation of an object relative to its parent (this is the transformation between local object space of the model and world space (ie where it is in the world)). More...
struct  iMovableListener
 Implement this class if you're interested in hearing about movable changes. More...
struct  iObjectWatcher
 This is a generic object watcher. More...
struct  iObjectWatcherListener
 Implement this class if you're interested in hearing about object watcher events. More...
struct  iPortal
 This is the interface to the Portal objects. More...
struct  iPortalCallback
 When a sector is missing this callback will be called. More...
struct  iPortalContainer
 A container for portals. More...
struct  iSceneNode
 This interface represents a node in the scene graph. More...
struct  iSceneNodeArray
 An array of scene node interfaces. More...
struct  iSector
 The iSector interface is used to work with "sectors". More...
struct  iSectorCallback
 Set a callback which is called when this sector is traversed. More...
struct  iSectorIterator
 An iterator to iterate over sectors. More...
struct  iSectorList
 A list of sectors. More...
struct  iSectorMeshCallback
 Set a callback which is called when a mesh is added or removed from this sector. More...
struct  iSharedVariable
 This class implements a refcounted value which can be shared across many objects and updated efficiently. More...
struct  iSharedVariableList
 A list of shared variables. More...
struct  iSharedVariableListener
 A listener so that you can get notified when a variable is changed. More...

Namespaces

namespace  CS
 

Main namespace for CrystalSpace.


Modules

 Lighting
 Mesh support
 Renderloops & Rendersteps
 Textures & Materials
 Views & Cameras
 Visibility

Defines

#define CS_PORTAL_CLIPDEST   0x00000001
 If this flag is set then this portal will clip all geometry in the destination sector.
#define CS_PORTAL_CLIPSTRADDLING   0x00000002
 If this flag is set then this portal will clip geometry of an object that is straddling this portal (i.e.
#define CS_PORTAL_COLLDET   0x00000080
 If this flag is set then this portal is used for collision detection.
#define CS_PORTAL_FLOAT   0x00000040
 If this flag is used then the portal will use possible available stencil buffer on the hardware to do good clipping.
#define CS_PORTAL_MIRROR   0x00000010
 If this flag is set then this portal mirrors space (changes order of the vertices of polygons).
#define CS_PORTAL_STATICDEST   0x00000020
 A flag which indicates if the destination of this portal should not be transformed from object to world space.
#define CS_PORTAL_VISCULL   0x00000100
 If this flag is set then this portal is used for visibility culling.
#define CS_PORTAL_WARP   0x00000008
 If this flag is set then this portal will do space warping.
#define CS_PORTAL_ZFILL   0x00000004
 If this flag is set then this portal will do a Z-fill after rendering the contents.

Enumerations

enum  csFogMode {
  CS_FOG_MODE_NONE = 0, CS_FOG_MODE_LINEAR_CRYSTALSPACE, CS_FOG_MODE_CRYSTALSPACE, CS_FOG_MODE_EXP,
  CS_FOG_MODE_EXP2, CS_FOG_MODE_LINEAR = CS_FOG_MODE_LINEAR_CRYSTALSPACE
}
 

Modes for per-sector fog.

More...

RegisterRenderPriority() flags



enum  csRenderPrioritySorting { CS_RENDPRI_SORT_NONE = 0, CS_RENDPRI_SORT_BACK2FRONT = 1, CS_RENDPRI_SORT_FRONT2BACK = 2 }

Operations

Operations indicate what has changed in one of the objects that is being watched.



#define CS_WATCH_LIGHT_ATTENUATION   8
 Light has changed attenuation.
#define CS_WATCH_LIGHT_COLOR   4
 Light has changed color.
#define CS_WATCH_LIGHT_DESTROY   1
 Light has been destroyed.
#define CS_WATCH_LIGHT_MOVE   2
 Light has moved.
#define CS_WATCH_LIGHT_RADIUS   3
 Light has changed radius.
#define CS_WATCH_LIGHT_SECTOR   5
 Light has changed sector.
#define CS_WATCH_MOVABLE_CHANGED   7
 Movable has changed otherwise.
#define CS_WATCH_MOVABLE_DESTROY   6
 Movable has been destroyed.
#define CS_WATCH_NONE   0
 No operation recorded yet.
#define CS_WATCH_SECTOR_NEWMESH   9
 Sector has a new mesh.
#define CS_WATCH_SECTOR_REMOVEMESH   10
 Sector has a removed mesh.

Define Documentation

#define CS_PORTAL_CLIPDEST   0x00000001

If this flag is set then this portal will clip all geometry in the destination sector.

This must be used for portals which arrive in the middle of a sector.

Definition at line 55 of file portal.h.

#define CS_PORTAL_CLIPSTRADDLING   0x00000002

If this flag is set then this portal will clip geometry of an object that is straddling this portal (i.e.

the object is both in the source and destination sector and the portal 'cuts' the object). This is only needed if the portal is on a surface that is transparent. A space warping portal will do this automatically.

Definition at line 64 of file portal.h.

#define CS_PORTAL_COLLDET   0x00000080

If this flag is set then this portal is used for collision detection.

Definition at line 113 of file portal.h.

#define CS_PORTAL_FLOAT   0x00000040

If this flag is used then the portal will use possible available stencil buffer on the hardware to do good clipping.

This flag should be used if you have a portal that is not at the boundary of the sector and that can be covered (or itself covers) other objects. It is usually used in combination with CS_PORTAL_ZFILL and sometimes with CS_PORTAL_CLIPDEST if the destination of the portal enters in the middle of a sector.

Definition at line 108 of file portal.h.

#define CS_PORTAL_MIRROR   0x00000010

If this flag is set then this portal mirrors space (changes order of the vertices of polygons).

Don't set this flag directly. It will be automatically set if a mirroring space warp is used with SetWarp().

Definition at line 89 of file portal.h.

#define CS_PORTAL_STATICDEST   0x00000020

A flag which indicates if the destination of this portal should not be transformed from object to world space.

For mirrors you should disable this flag because you want the destination to move with the source.

Definition at line 97 of file portal.h.

#define CS_PORTAL_VISCULL   0x00000100

If this flag is set then this portal is used for visibility culling.

Definition at line 118 of file portal.h.

#define CS_PORTAL_WARP   0x00000008

If this flag is set then this portal will do space warping.

You can use this to implement mirrors or other weird portal effects. Don't set this flag directly. Use SetWarp() instead. It is safe to disable and query this flag though.

Definition at line 82 of file portal.h.

#define CS_PORTAL_ZFILL   0x00000004

If this flag is set then this portal will do a Z-fill after rendering the contents.

This is mainly useful for floating portals where it is possible that there is geometry in the same sector that will be rendered behind the portal (and thus could accidently get written in the portal sector because the Z-buffer cannot be trusted).

Definition at line 74 of file portal.h.

#define CS_WATCH_LIGHT_ATTENUATION   8

Light has changed attenuation.

Definition at line 57 of file objwatch.h.

#define CS_WATCH_LIGHT_COLOR   4

Light has changed color.

Definition at line 49 of file objwatch.h.

#define CS_WATCH_LIGHT_DESTROY   1

Light has been destroyed.

Definition at line 43 of file objwatch.h.

#define CS_WATCH_LIGHT_MOVE   2

Light has moved.

Definition at line 45 of file objwatch.h.

#define CS_WATCH_LIGHT_RADIUS   3

Light has changed radius.

Definition at line 47 of file objwatch.h.

#define CS_WATCH_LIGHT_SECTOR   5

Light has changed sector.

Definition at line 51 of file objwatch.h.

#define CS_WATCH_MOVABLE_CHANGED   7

Movable has changed otherwise.

Definition at line 55 of file objwatch.h.

#define CS_WATCH_MOVABLE_DESTROY   6

Movable has been destroyed.

Definition at line 53 of file objwatch.h.

#define CS_WATCH_NONE   0

No operation recorded yet.

Definition at line 41 of file objwatch.h.

#define CS_WATCH_SECTOR_NEWMESH   9

Sector has a new mesh.

Definition at line 59 of file objwatch.h.

#define CS_WATCH_SECTOR_REMOVEMESH   10

Sector has a removed mesh.

Definition at line 61 of file objwatch.h.


Enumeration Type Documentation

enum csFogMode

Modes for per-sector fog.

Enumerator:
CS_FOG_MODE_NONE 

Fog is disabled.

CS_FOG_MODE_LINEAR_CRYSTALSPACE 

Combination of linear fog and “CrystalSpace” fog.

This computes a linear fog for the sector: there is no fog until the distance csFog::start, and it will linearly increase until it's fully opaque at the distance csFog::end. (For a distance d, the fog function is 1 - ((e - d)/(e - s)).

There's also the specialty that the fog is cut off (fully transparent) at the distance csFog::limit if that distance is greated than the end distance:

And this computed linear fog is modulated with the sector fog value from CS_FOG_MODE_CRYSTALSPACE.

CS_FOG_MODE_CRYSTALSPACE 

“CrystalSpace” fog.

This fog has the special property to be correct across portals, even if the sectors have different fog densities (or colors).

The basis for this fog mode is an exponential fog, the fog function for a distance d is 1 - exp(-(d-0.1)*density*7). The distance is either the distance from the viewer, or, if portals are involved, the distance from the portal.

CS_FOG_MODE_EXP 

Exponential fog.

The fog function for a distance d is 1 - exp(-d*density). The distance is the distance from the viewer.

Note this fog will look wrong if viewed through a portal.

CS_FOG_MODE_EXP2 

Exponential fog.

The fog function for a distance d is 1 - exp(-(d*density)^2). The distance is the distance from the viewer.

Note this fog will look wrong if viewed through a portal.

CS_FOG_MODE_LINEAR 

Alternative name for CS_FOG_MODE_LINEAR_CRYSTALSPACE.

Definition at line 64 of file sector.h.

Enumerator:
CS_RENDPRI_SORT_NONE 

Do not sort this priority.

CS_RENDPRI_SORT_BACK2FRONT 

Sort this priority back to front.

CS_RENDPRI_SORT_FRONT2BACK 

Sort this priority front to back.

Definition at line 87 of file engine.h.


Generated for Crystal Space 2.1 by doxygen 1.6.1