AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
agxOSG::ClipPlane Class Reference

This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane. More...

#include <ClipPlane.h>

+ Inheritance diagram for agxOSG::ClipPlane:

Public Member Functions

 ClipPlane (agx::Real a, agx::Real b, agx::Real c, agx::Real d)
 Create clip plane from plane constants.
 
 ClipPlane (const agx::Plane &plane)
 Create clip plane from agx::Plane.
 
 ClipPlane (const agx::Vec3 &normal, const agx::Vec3 &position)
 Create clip plane from a position and a normal.
 
void clipAgainstParticleSystem ()
 Performs the clipping of the set particle system.
 
bool getEnable () const
 Get if the clip plane is enabled.
 
agx::Vec3 getNormal () const
 Get the normal of the clip plane.
 
agx::Plane getPlane () const
 Get a created agx::Plane representation of the clip plane.
 
agx::Vec3 getPosition () const
 Get the position of the clip plane.
 
void setClipPlane (const agx::Plane &plane)
 Set clip plane from an agx plane.
 
void setEnable (bool enable)
 Set enable of the clip plane.
 
void setNormal (const agx::Vec3 &normal)
 Set normal of clip plane.
 
void setParticleSystemToClip (agx::ParticleSystem *system)
 Set the particle system that should be clipped against the clip plane.
 
void setPosition (const agx::Vec3 &position)
 Set position of clip plane.
 

Detailed Description

This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane.

This also extends the node with an update callback that culls particles against the clip plane. This node should be inserted at the top of the scene node in order to clip everything under it.

Definition at line 43 of file ClipPlane.h.

Constructor & Destructor Documentation

◆ ClipPlane() [1/3]

agxOSG::ClipPlane::ClipPlane ( const agx::Plane plane)

Create clip plane from agx::Plane.

◆ ClipPlane() [2/3]

agxOSG::ClipPlane::ClipPlane ( const agx::Vec3 normal,
const agx::Vec3 position 
)

Create clip plane from a position and a normal.

◆ ClipPlane() [3/3]

agxOSG::ClipPlane::ClipPlane ( agx::Real  a,
agx::Real  b,
agx::Real  c,
agx::Real  d 
)

Create clip plane from plane constants.

Member Function Documentation

◆ clipAgainstParticleSystem()

void agxOSG::ClipPlane::clipAgainstParticleSystem ( )

Performs the clipping of the set particle system.

◆ getEnable()

bool agxOSG::ClipPlane::getEnable ( ) const

Get if the clip plane is enabled.

◆ getNormal()

agx::Vec3 agxOSG::ClipPlane::getNormal ( ) const

Get the normal of the clip plane.

◆ getPlane()

agx::Plane agxOSG::ClipPlane::getPlane ( ) const

Get a created agx::Plane representation of the clip plane.

◆ getPosition()

agx::Vec3 agxOSG::ClipPlane::getPosition ( ) const

Get the position of the clip plane.

◆ setClipPlane()

void agxOSG::ClipPlane::setClipPlane ( const agx::Plane plane)

Set clip plane from an agx plane.

Parameters
plane- the plane that will be used to set the clip plane.

◆ setEnable()

void agxOSG::ClipPlane::setEnable ( bool  enable)

Set enable of the clip plane.

Parameters
enable- true is clip plane should be enabled, false otherwise.

◆ setNormal()

void agxOSG::ClipPlane::setNormal ( const agx::Vec3 normal)

Set normal of clip plane.

Parameters
normal- the normal to be set to the plane.

◆ setParticleSystemToClip()

void agxOSG::ClipPlane::setParticleSystemToClip ( agx::ParticleSystem system)

Set the particle system that should be clipped against the clip plane.

Parameters
system- the particle system to should be clipped against the plane.

◆ setPosition()

void agxOSG::ClipPlane::setPosition ( const agx::Vec3 position)

Set position of clip plane.

Parameters
position- the position to be set to the plane.

The documentation for this class was generated from the following file: