AGX Dynamics
2.37.3.2
ClipPlane.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
#pragma once
18
19
#include <
agx/PushDisableWarnings.h
>
// Disabling warnings. Include agx/PopDisableWarnings.h below!
20
#include <osg/ClipNode>
21
#include <
agx/PopDisableWarnings.h
>
// End of disabled warnings.
22
#include <
agx/Plane.h
>
23
24
#include <
agxOSG/export.h
>
25
#include <
agxOSG/Node.h
>
26
27
// Forward declaration
28
namespace
agx
29
{
30
class
ParticleSystem;
31
}
32
33
namespace
agxOSG
34
{
35
AGX_DECLARE_POINTER_TYPES
(
ClipPlane
);
36
AGX_DECLARE_VECTOR_TYPES
(
ClipPlane
);
37
43
class
AGXOSG_EXPORT
ClipPlane
:
public
osg::ClipNode
44
{
45
public
:
49
ClipPlane
(
const
agx::Plane
& plane );
50
54
ClipPlane
(
const
agx::Vec3
& normal,
const
agx::Vec3
& position );
55
59
ClipPlane
(
agx::Real
a,
agx::Real
b,
agx::Real
c,
agx::Real
d );
60
65
void
setClipPlane(
const
agx::Plane
& plane );
66
71
void
setPosition(
const
agx::Vec3
& position );
72
77
void
setNormal(
const
agx::Vec3
& normal );
78
83
void
setParticleSystemToClip(
agx::ParticleSystem
* system );
84
89
void
setEnable(
bool
enable);
90
94
agx::Plane
getPlane()
const
;
95
99
agx::Vec3
getPosition()
const
;
100
104
agx::Vec3
getNormal()
const
;
105
109
bool
getEnable()
const
;
110
114
void
clipAgainstParticleSystem();
115
116
private
:
117
void
setDataFromPlane(
const
agx::Plane
& plane);
118
119
private
:
120
agx::Vec3
m_position;
121
agx::Vec3
m_normal;
122
osg::ref_ptr<osg::ClipPlane> m_clipPlane;
123
agx::ParticleSystem
* m_system;
124
};
125
}
AGXOSG_EXPORT
#define AGXOSG_EXPORT
PopDisableWarnings.h
Plane.h
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition:
Referenced.h:254
agxOSG::ClipPlane
This class wraps the ClipPlane functionality of osg together with a clip node and a clip plane...
Definition:
ClipPlane.h:43
agx::PlaneT
Class representing the mathematical concept of a plane, also called a half- space.
Definition:
Plane.h:31
Node.h
agx::ParticleSystem
A basic particle system that contains all the storages and buffers required for basic operation and a...
Definition:
ParticleSystem.h:67
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition:
AddedMassInteraction.h:22
agxOSG
The agxOSG namespace provides functionality for visualizing AGX simulations with OpenSceneGraph.
agx::Vec3T< Real >
PushDisableWarnings.h
export.h
agx::Real
double Real
Definition:
Real.h:42
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition:
Vector.h:34
include
agxOSG
ClipPlane.h
Generated on Fri Apr 12 2024 12:40:21 for AGX Dynamics by
1.8.13