AGXDynamics
2.31.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
RockGenerator.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2021. 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
#ifndef AGXOSG_ROCKGENERATOR_H
18
#define AGXOSG_ROCKGENERATOR_H
19
20
#include <
agxOSG/export.h
>
21
#include <
agx/Referenced.h
>
22
#include <
agx/Vec3.h
>
23
24
#include <
agx/PushDisableWarnings.h
>
// Disabling warnings. Include agx/PopDisableWarnings.h below!
25
#include <osg/Node>
26
#include <
agx/PopDisableWarnings.h
>
// End of disabled warnings.
27
28
namespace
agxOSG {
29
class
Node;
30
}
31
32
namespace
agxCollide {
33
class
Space;
34
}
35
36
namespace
agx {
37
class
Material;
38
class
RigidBody;
39
}
40
41
namespace
agxSDK {
42
class
Assembly;
43
}
44
45
namespace
agxOSG
46
{
47
class
AGXOSG_EXPORT
RockGenerator
:
public
agx::Referenced
48
{
49
public
:
50
enum
RockType
51
{
52
COMPOSITE_ONE
,
53
COMPOSITE_TWO
,
54
COMPOSITE_THREE
,
55
COMPOSITE_FOUR
,
56
MAYA_ROCK1
,
57
MAYA_ROCK2
,
58
MAYA_ROCK3
,
59
NUM_ROCK_TYPES
60
};
61
62
RockGenerator
();
63
64
void
generateRocks(
agxSDK::Assembly
*
root
,
65
agxCollide::Space
*space,
66
int
numRocks,
67
osg::Group *visualRoot,
68
agx::Real
emitterRadius,
69
agx::Real
elementRadius,
70
agx::Material
*rockMaterial,
71
agx::Real
emitVelocityMagnitude = 0.0,
72
agx::Real
elementPositionJitter = 0.5,
73
agx::Real
elementRadiusJitter = 0.5,
74
agx::Real
elementSpacing = 0.0 );
75
76
77
protected
:
78
virtual
~
RockGenerator
();
79
80
agx::RigidBody
*generateRock(osg::Group *visualRoot, RockType
type
,
agx::Real
elementRadius,
agx::Real
elementPositionJitter,
agx::Real
elementRadiusJitter,
agx::Real
elementSpacing,
agx::Material
*rockMaterial);
81
void
generateMayaRock(osg::Group *visualRoot, RockType
type
,
agx::RigidBody
*body,
agx::Real
elementRadius,
agx::Real
elementPositionJitter,
agx::Material
*rockMaterial);
82
void
addSphereElement(
agx::RigidBody
*body, osg::Group *visualRoot,
const
agx::Vec3
& localOffset,
agx::Real
elementRadius,
agx::Real
elementPositionJitter,
agx::Real
elementRadiusJitter,
agx::Material
*rockMaterial);
83
84
private
:
85
osg::ref_ptr<osg::Node> m_visualRock1;
86
osg::ref_ptr<osg::Node> m_visualRock2;
87
osg::ref_ptr<osg::Node> m_visualRock3;
88
};
89
90
typedef
agx::ref_ptr<RockGenerator>
RockGeneratorRef
;
91
}
92
93
#endif
/* AGXOSG_ROCKGENERATOR_H */
agxOSG::RockGenerator::COMPOSITE_FOUR
Definition:
RockGenerator.h:55
agxOSG::RockGenerator::COMPOSITE_TWO
Definition:
RockGenerator.h:53
Vec3.h
AGXOSG_EXPORT
#define AGXOSG_EXPORT
agxOSG::RockGenerator
Definition:
RockGenerator.h:47
PopDisableWarnings.h
agxOSG::RockGenerator::COMPOSITE_ONE
Definition:
RockGenerator.h:52
agx::Referenced
Base class providing referencing counted objects.
Definition:
Referenced.h:113
agxCollide::Space
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition:
Space.h:81
agxOSG::RockGenerator::MAYA_ROCK1
Definition:
RockGenerator.h:56
agxOSG::RockGenerator::MAYA_ROCK2
Definition:
RockGenerator.h:57
Referenced.h
agx::ref_ptr
Smart pointer for handling referenced counted objects.
Definition:
ref_ptr.h:29
agxOSG::RockGenerator::MAYA_ROCK3
Definition:
RockGenerator.h:58
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition:
RigidBody.h:52
agx::Material
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition:
Material.h:384
agx::Vec3T< Real >
agxOSG::RockGeneratorRef
agx::ref_ptr< RockGenerator > RockGeneratorRef
Definition:
RockGenerator.h:90
PushDisableWarnings.h
export.h
agxOSG::RockGenerator::COMPOSITE_THREE
Definition:
RockGenerator.h:54
agx::Real
double Real
Definition:
Real.h:42
agx::root
AGXCORE_EXPORT Component * root()
agxSDK::Assembly
An assembly is a collection of basic simulation objects, such as rigid bodies, constraints, geometries.
Definition:
Assembly.h:73
type
GLenum type
Definition:
gl.h:5539
agxOSG::RockGenerator::RockType
RockType
Definition:
RockGenerator.h:50
include
agxOSG
RockGenerator.h
Generated on Mon Mar 21 2022 11:53:04 for AGXDynamics by
1.8.5