SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLCoordAxis Class Reference

Axis aligned coordinate axis mesh. More...

#include <SLCoordAxis.h>

Inheritance diagram for SLCoordAxis:
[legend]

Public Member Functions

 SLCoordAxis (SLAssetManager *assetMgr, SLfloat arrowThickness=0.05f, SLfloat arrowHeadLenght=0.2f, SLfloat arrowHeadWidth=0.1f)
 SLAxis::SLAxis ctor with the arrow dimensions. More...
 
void buildMesh ()
 SLCoordAxis::buildMesh fills in the underlying arrays from the SLMesh object. More...
 
- Public Member Functions inherited from SLMesh
 SLMesh (SLAssetManager *assetMgr, const SLstring &name="Mesh")
 Construct a new SLMesh::SLMesh object. More...
 
 ~SLMesh () override
 The destructor deletes everything by calling deleteData. More...
 
virtual void init (SLNode *node)
 SLMesh::shapeInit sets the transparency flag of the AABB. More...
 
virtual void draw (SLSceneView *sv, SLNode *node, SLuint intances=0)
 
void drawIntoDepthBuffer (SLSceneView *sv, SLNode *node, SLMaterial *depthMat)
 Simplified drawing method for shadow map creation. More...
 
void addStats (SLNodeStats &stats)
 
virtual void buildAABB (SLAABBox &aabb, const SLMat4f &wmNode)
 
void updateAccelStruct ()
 
SLbool hit (SLRay *ray, SLNode *node)
 
virtual void preShade (SLRay *ray)
 
virtual void deleteData ()
 SLMesh::deleteData deletes all mesh data and vbo's. More...
 
virtual void deleteDataGpu ()
 
void deleteSelected (SLNode *node)
 Deletes the rectangle selected vertices and the dependent triangles. More...
 
void deleteUnused ()
 Deletes unused vertices (= vertices that are not indexed in I16 or I32) More...
 
virtual void calcMinMax ()
 
virtual void calcNormals ()
 SLMesh::calcNormals recalculates vertex normals for triangle meshes. More...
 
void calcCenterRad (SLVec3f &center, SLfloat &radius)
 
SLbool hitTriangleOS (SLRay *ray, SLNode *node, SLuint iT)
 
virtual void generateVAO (SLGLVertexArray &vao)
 Generate the Vertex Array Object for a specific shader program. More...
 
void computeHardEdgesIndices (float angleRAD, float epsilon)
 computes the hard edges and stores the vertex indexes separately More...
 
void transformSkin (bool forceCPUSkinning, const std::function< void(SLMesh *)> &cbInformNodes)
 Transforms the vertex positions and normals with by joint weights. More...
 
void deselectPartialSelection ()
 
SLMaterialmat () const
 
SLMaterialmatOut () const
 
SLGLPrimitiveType primitive () const
 
const SLAnimSkeletonskeleton () const
 
SLuint numI () const
 
SLGLVertexArrayvao ()
 
SLbool isSelected () const
 
SLfloat edgeAngleDEG () const
 
SLfloat edgeWidth () const
 
SLCol4f edgeColor () const
 
SLVec3f finalP (SLuint i)
 
SLVec3f finalN (SLuint i)
 
SLbool accelStructIsOutOfDate ()
 
void mat (SLMaterial *m)
 
void matOut (SLMaterial *m)
 
void primitive (SLGLPrimitiveType pt)
 
void skeleton (SLAnimSkeleton *skel)
 
void isSelected (bool isSelected)
 
void edgeWidth (SLfloat ew)
 
void edgeAngleDEG (SLfloat ea)
 
void edgeColor (const SLCol4f &ec)
 
void vertexPosEpsilon (SLfloat eps)
 
- Public Member Functions inherited from SLObject
 SLObject (const SLstring &Name="", const SLstring &url="")
 
virtual ~SLObject ()
 
void name (const SLstring &Name)
 
void url (const SLstring &url)
 
const SLstringname () const
 
const SLstringurl () const
 

Private Attributes

SLfloat _arrowThickness
 Thickness of the arrow. More...
 
SLfloat _arrowHeadLength
 Lenght of the arrow head. More...
 
SLfloat _arrowHeadWidth
 Width of the arrow head. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SLMesh
static void calcTex3DMatrix (SLNode *node)
 
- Public Attributes inherited from SLMesh
SLVVec3f P
 Vector for vertex positions layout (location = 0) More...
 
SLVVec3f N
 Vector for vertex normals (opt.) layout (location = 1) More...
 
SLVVec2f UV [2]
 Array of 2 Vectors for tex. coords. (opt.) layout (location = 2) More...
 
SLVCol4f C
 Vector of vertex colors (opt.) layout (location = 4) More...
 
SLVVec4f T
 Vector of vertex tangents (opt.) layout (location = 5) More...
 
SLVVuchar Ji
 2D Vector of per vertex joint ids (opt.) layout (location = 6) More...
 
SLVVfloat Jw
 2D Vector of per vertex joint weights (opt.) layout (location = 7) More...
 
SLVVec3f skinnedP
 temp. vector for CPU skinned vertex positions More...
 
SLVVec3f skinnedN
 temp. vector for CPU skinned vertex normals More...
 
SLVushort I16
 Vector of vertex indices 16 bit. More...
 
SLVuint I32
 Vector of vertex indices 32 bit. More...
 
SLVuint IS32
 Vector of rectangle selected vertex indices 32 bit. More...
 
SLVushort IE16
 Vector of hard edges vertex indices 16 bit (see computeHardEdgesIndices) More...
 
SLVuint IE32
 Vector of hard edges vertex indices 32 bit (see computeHardEdgesIndices) More...
 
SLVec3f minP
 min. vertex in OS More...
 
SLVec3f maxP
 max. vertex in OS More...
 
- Protected Attributes inherited from SLMesh
SLGLPrimitiveType _primitive
 Primitive type (default triangles) More...
 
SLMaterial_mat
 Pointer to the inside material. More...
 
SLMaterial_matOut
 Pointer to the outside material. More...
 
SLGLVertexArray _vao
 Main OpenGL Vertex Array Object for drawing. More...
 
SLGLVertexArrayExt _vaoN
 OpenGL VAO for optional normal drawing. More...
 
SLGLVertexArrayExt _vaoT
 OpenGL VAO for optional tangent drawing. More...
 
SLGLVertexArrayExt _vaoS
 OpenGL VAO for optional selection drawing. More...
 
SLbool _isSelected
 Flag if mesh is partially of fully selected. More...
 
SLfloat _edgeAngleDEG
 Edge crease angle in degrees between face normals (30 deg. default) More...
 
SLfloat _edgeWidth
 Line width for hard edge drawing. More...
 
SLCol4f _edgeColor
 Color for hard edge drawing. More...
 
SLfloat _vertexPosEpsilon
 Vertex position epsilon used in computeHardEdgesIndices. More...
 
SLbool _isVolume
 Flag for RT if mesh is a closed volume. More...
 
SLAccelStruct_accelStruct
 KD-tree or uniform grid. More...
 
SLbool _accelStructIsOutOfDate
 Flag if accel. struct needs update. More...
 
SLAnimSkeleton_skeleton
 The skeleton this mesh is bound to. More...
 
SLVMat4f _jointMatrices
 Joint matrix vector for this mesh. More...
 
SLbool _isCPUSkinned
 Flag if mesh has been skinned on CPU during update. More...
 
SLVVec3f_finalP
 Pointer to final vertex position vector. More...
 
SLVVec3f_finalN
 pointer to final vertex normal vector More...
 
- Protected Attributes inherited from SLObject
SLstring _name
 name of an object More...
 
SLstring _url
 uniform resource locator More...
 

Detailed Description

Axis aligned coordinate axis mesh.

The SLAxis mesh draws axis aligned arrows to indicate the coordinate system. All arrows have unit lenght. The arrow along x,y & z axis have the colors red, green & blue.

Remarks
It is important that during instantiation NO OpenGL functions (gl*) get called because this constructor will be most probably called in a parallel thread from within an SLScene::registerAssetsToLoad or SLScene::assemble function. All objects that get rendered have to do their OpenGL initialization when they are used the first time during rendering in the main thread. For this mesh it means that the objects for OpenGL drawing (_vao, _vaoP, _vaoN, _vaoT and _vaoS) remain unused until the first frame is rendered.

Definition at line 30 of file SLCoordAxis.h.

Constructor & Destructor Documentation

◆ SLCoordAxis()

SLCoordAxis::SLCoordAxis ( SLAssetManager assetMgr,
SLfloat  arrowThickness = 0.05f,
SLfloat  arrowHeadLenght = 0.2f,
SLfloat  arrowHeadWidth = 0.1f 
)
explicit

SLAxis::SLAxis ctor with the arrow dimensions.

Definition at line 14 of file SLCoordAxis.cpp.

17  : SLMesh(assetMgr, "Coord-Axis Mesh")
18 {
19  _arrowThickness = arrowThickness;
20  _arrowHeadLength = arrowHeadLenght;
21  _arrowHeadWidth = arrowHeadWidth;
22  buildMesh();
23 }
SLfloat _arrowThickness
Thickness of the arrow.
Definition: SLCoordAxis.h:41
void buildMesh()
SLCoordAxis::buildMesh fills in the underlying arrays from the SLMesh object.
Definition: SLCoordAxis.cpp:26
SLfloat _arrowHeadLength
Lenght of the arrow head.
Definition: SLCoordAxis.h:42
SLfloat _arrowHeadWidth
Width of the arrow head.
Definition: SLCoordAxis.h:43
SLMesh(SLAssetManager *assetMgr, const SLstring &name="Mesh")
Construct a new SLMesh::SLMesh object.
Definition: SLMesh.cpp:51

Member Function Documentation

◆ buildMesh()

void SLCoordAxis::buildMesh ( )

SLCoordAxis::buildMesh fills in the underlying arrays from the SLMesh object.

Definition at line 26 of file SLCoordAxis.cpp.

27 {
28  // allocate new vectors of SLMesh
29  P.clear();
30  N.clear();
31  C.clear();
32  UV[0].clear();
33  UV[1].clear();
34  I16.clear();
35  I32.clear();
36 
37  // Set one default material index
38  // In SLMesh::init this will be set automatically to SLMaterial::diffuseAttrib
39  mat(nullptr);
40 
41  SLushort i = 0, v1 = 0, v2 = 0, v3 = 0, v4 = 0;
42  SLfloat t = _arrowThickness * 0.5f;
44  SLfloat w = _arrowHeadWidth * 0.5f;
45 
46  // predefined normals
50 
51  // clang-format off
52  // arrow towards +x
53  P.push_back(SLVec3f( t, t, t)); C.push_back(r); v1=i; i++;
54  P.push_back(SLVec3f(1-h, t, t)); C.push_back(r); v2=i; i++;
55  P.push_back(SLVec3f(1-h, t,-t)); C.push_back(r); v3=i; i++;
56  P.push_back(SLVec3f( t, t,-t)); C.push_back(r); v4=i; i++;
57  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
58  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
59 
60  P.push_back(SLVec3f( t,-t, t)); C.push_back(r); v1=i; i++;
61  P.push_back(SLVec3f(1-h,-t, t)); C.push_back(r); v2=i; i++;
62  P.push_back(SLVec3f(1-h, t, t)); C.push_back(r); v3=i; i++;
63  P.push_back(SLVec3f( t, t, t)); C.push_back(r); v4=i; i++;
64  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
65  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
66 
67  P.push_back(SLVec3f( t,-t,-t)); C.push_back(r); v1=i; i++;
68  P.push_back(SLVec3f(1-h,-t,-t)); C.push_back(r); v2=i; i++;
69  P.push_back(SLVec3f(1-h,-t, t)); C.push_back(r); v3=i; i++;
70  P.push_back(SLVec3f( t,-t, t)); C.push_back(r); v4=i; i++;
71  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
72  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
73 
74  P.push_back(SLVec3f( t, t,-t)); C.push_back(r); v1=i; i++;
75  P.push_back(SLVec3f(1-h, t,-t)); C.push_back(r); v2=i; i++;
76  P.push_back(SLVec3f(1-h,-t,-t)); C.push_back(r); v3=i; i++;
77  P.push_back(SLVec3f( t,-t,-t)); C.push_back(r); v4=i; i++;
78  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
79  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
80 
81  P.push_back(SLVec3f(1-h, w, w)); C.push_back(r); v1=i; i++;
82  P.push_back(SLVec3f( 1, 0, 0)); C.push_back(r); v2=i; i++;
83  P.push_back(SLVec3f(1-h, w,-w)); C.push_back(r); v3=i; i++;
84  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
85  P.push_back(SLVec3f(1-h, w, w)); C.push_back(r); v1=i; i++;
86  P.push_back(SLVec3f(1-h,-w, w)); C.push_back(r); v2=i; i++;
87  P.push_back(SLVec3f( 1, 0, 0)); C.push_back(r); v3=i; i++;
88  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
89  P.push_back(SLVec3f(1-h,-w, w)); C.push_back(r); v1=i; i++;
90  P.push_back(SLVec3f(1-h,-w,-w)); C.push_back(r); v2=i; i++;
91  P.push_back(SLVec3f( 1, 0, 0)); C.push_back(r); v3=i; i++;
92  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
93  P.push_back(SLVec3f(1-h,-w,-w)); C.push_back(r); v1=i; i++;
94  P.push_back(SLVec3f(1-h, w,-w)); C.push_back(r); v2=i; i++;
95  P.push_back(SLVec3f( 1, 0, 0)); C.push_back(r); v3=i; i++;
96  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
97  P.push_back(SLVec3f(1-h, w, w)); C.push_back(r); v1=i; i++;
98  P.push_back(SLVec3f(1-h, w,-w)); C.push_back(r); v2=i; i++;
99  P.push_back(SLVec3f(1-h,-w,-w)); C.push_back(r); v3=i; i++;
100  P.push_back(SLVec3f(1-h,-w, w)); C.push_back(r); v4=i; i++;
101  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
102  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
103 
104  P.push_back(SLVec3f( -t, t, t)); C.push_back(r); v1=i; i++;
105  P.push_back(SLVec3f( -t, t,-t)); C.push_back(r); v2=i; i++;
106  P.push_back(SLVec3f( -t,-t,-t)); C.push_back(r); v3=i; i++;
107  P.push_back(SLVec3f( -t,-t, t)); C.push_back(r); v4=i; i++;
108  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
109  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
110 
111  // arrow towards +y
112  P.push_back(SLVec3f( t, t, t)); C.push_back(g); v1=i; i++;
113  P.push_back(SLVec3f( t,1-h, t)); C.push_back(g); v2=i; i++;
114  P.push_back(SLVec3f( t,1-h,-t)); C.push_back(g); v3=i; i++;
115  P.push_back(SLVec3f( t, t,-t)); C.push_back(g); v4=i; i++;
116  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
117  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
118 
119  P.push_back(SLVec3f(-t, t, t)); C.push_back(g); v1=i; i++;
120  P.push_back(SLVec3f(-t,1-h, t)); C.push_back(g); v2=i; i++;
121  P.push_back(SLVec3f( t,1-h, t)); C.push_back(g); v3=i; i++;
122  P.push_back(SLVec3f( t, t, t)); C.push_back(g); v4=i; i++;
123  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
124  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
125 
126  P.push_back(SLVec3f(-t, t,-t)); C.push_back(g); v1=i; i++;
127  P.push_back(SLVec3f(-t,1-h,-t)); C.push_back(g); v2=i; i++;
128  P.push_back(SLVec3f(-t,1-h, t)); C.push_back(g); v3=i; i++;
129  P.push_back(SLVec3f(-t, t, t)); C.push_back(g); v4=i; i++;
130  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
131  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
132 
133  P.push_back(SLVec3f( t, t,-t)); C.push_back(g); v1=i; i++;
134  P.push_back(SLVec3f( t,1-h,-t)); C.push_back(g); v2=i; i++;
135  P.push_back(SLVec3f(-t,1-h,-t)); C.push_back(g); v3=i; i++;
136  P.push_back(SLVec3f(-t, t,-t)); C.push_back(g); v4=i; i++;
137  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
138  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
139 
140  P.push_back(SLVec3f( w,1-h, w)); C.push_back(g); v1=i; i++;
141  P.push_back(SLVec3f( 0, 1, 0)); C.push_back(g); v2=i; i++;
142  P.push_back(SLVec3f( w,1-h,-w)); C.push_back(g); v3=i; i++;
143  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
144 
145  P.push_back(SLVec3f( w,1-h, w)); C.push_back(g); v1=i; i++;
146  P.push_back(SLVec3f(-w,1-h, w)); C.push_back(g); v2=i; i++;
147  P.push_back(SLVec3f( 0, 1, 0)); C.push_back(g); v3=i; i++;
148  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
149  P.push_back(SLVec3f(-w,1-h, w)); C.push_back(g); v1=i; i++;
150  P.push_back(SLVec3f(-w,1-h,-w)); C.push_back(g); v2=i; i++;
151  P.push_back(SLVec3f( 0, 1, 0)); C.push_back(g); v3=i; i++;
152  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
153 
154  P.push_back(SLVec3f(-w,1-h,-w)); C.push_back(g); v1=i; i++;
155  P.push_back(SLVec3f( w,1-h,-w)); C.push_back(g); v2=i; i++;
156  P.push_back(SLVec3f( 0, 1, 0)); C.push_back(g); v3=i; i++;
157  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
158 
159  P.push_back(SLVec3f( w,1-h, w)); C.push_back(g); v1=i; i++;
160  P.push_back(SLVec3f( w,1-h,-w)); C.push_back(g); v2=i; i++;
161  P.push_back(SLVec3f(-w,1-h,-w)); C.push_back(g); v3=i; i++;
162  P.push_back(SLVec3f(-w,1-h, w)); C.push_back(g); v4=i; i++;
163  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
164  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
165 
166  P.push_back(SLVec3f( t, -t, t)); C.push_back(g); v1=i; i++;
167  P.push_back(SLVec3f( t, -t,-t)); C.push_back(g); v2=i; i++;
168  P.push_back(SLVec3f(-t, -t,-t)); C.push_back(g); v3=i; i++;
169  P.push_back(SLVec3f(-t, -t, t)); C.push_back(g); v4=i; i++;
170  I16.push_back(v1); I16.push_back(v3); I16.push_back(v2);
171  I16.push_back(v1); I16.push_back(v4); I16.push_back(v3);
172 
173  // arrow towards +z
174  P.push_back(SLVec3f( t, t, t)); C.push_back(b); v1=i; i++;
175  P.push_back(SLVec3f( t, t,1-h)); C.push_back(b); v2=i; i++;
176  P.push_back(SLVec3f( t,-t,1-h)); C.push_back(b); v3=i; i++;
177  P.push_back(SLVec3f( t,-t, t)); C.push_back(b); v4=i; i++;
178  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
179  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
180 
181  P.push_back(SLVec3f(-t, t, t)); C.push_back(b); v1=i; i++;
182  P.push_back(SLVec3f(-t, t,1-h)); C.push_back(b); v2=i; i++;
183  P.push_back(SLVec3f( t, t,1-h)); C.push_back(b); v3=i; i++;
184  P.push_back(SLVec3f( t, t, t)); C.push_back(b); v4=i; i++;
185  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
186  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
187 
188  P.push_back(SLVec3f(-t,-t, t)); C.push_back(b); v1=i; i++;
189  P.push_back(SLVec3f(-t,-t,1-h)); C.push_back(b); v2=i; i++;
190  P.push_back(SLVec3f(-t, t,1-h)); C.push_back(b); v3=i; i++;
191  P.push_back(SLVec3f(-t, t, t)); C.push_back(b); v4=i; i++;
192  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
193  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
194 
195  P.push_back(SLVec3f( t,-t, t)); C.push_back(b); v1=i; i++;
196  P.push_back(SLVec3f( t,-t,1-h)); C.push_back(b); v2=i; i++;
197  P.push_back(SLVec3f(-t,-t,1-h)); C.push_back(b); v3=i; i++;
198  P.push_back(SLVec3f(-t,-t, t)); C.push_back(b); v4=i; i++;
199  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
200  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
201 
202  P.push_back(SLVec3f( w, w,1-h)); C.push_back(b); v1=i; i++;
203  P.push_back(SLVec3f( 0, 0, 1)); C.push_back(b); v2=i; i++;
204  P.push_back(SLVec3f( w,-w,1-h)); C.push_back(b); v3=i; i++;
205  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
206  P.push_back(SLVec3f( w, w,1-h)); C.push_back(b); v1=i; i++;
207  P.push_back(SLVec3f(-w, w,1-h)); C.push_back(b); v2=i; i++;
208  P.push_back(SLVec3f( 0, 0, 1)); C.push_back(b); v3=i; i++;
209  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
210 
211  P.push_back(SLVec3f(-w, w,1-h)); C.push_back(b); v1=i; i++;
212  P.push_back(SLVec3f(-w,-w,1-h)); C.push_back(b); v2=i; i++;
213  P.push_back(SLVec3f( 0, 0, 1)); C.push_back(b); v3=i; i++;
214  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
215  P.push_back(SLVec3f(-w,-w,1-h)); C.push_back(b); v1=i; i++;
216  P.push_back(SLVec3f( w,-w,1-h)); C.push_back(b); v2=i; i++;
217  P.push_back(SLVec3f( 0, 0, 1)); C.push_back(b); v3=i; i++;
218  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
219 
220  P.push_back(SLVec3f( w, w,1-h)); C.push_back(b); v1=i; i++;
221  P.push_back(SLVec3f( w,-w,1-h)); C.push_back(b); v2=i; i++;
222  P.push_back(SLVec3f(-w,-w,1-h)); C.push_back(b); v3=i; i++;
223  P.push_back(SLVec3f(-w, w,1-h)); C.push_back(b); v4=i; i++;
224  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
225  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
226 
227  P.push_back(SLVec3f( t, t, -t)); C.push_back(b); v1=i; i++;
228  P.push_back(SLVec3f( t,-t, -t)); C.push_back(b); v2=i; i++;
229  P.push_back(SLVec3f(-t,-t, -t)); C.push_back(b); v3=i; i++;
230  P.push_back(SLVec3f(-t, t, -t)); C.push_back(b); v4=i; i++;
231  I16.push_back(v1); I16.push_back(v2); I16.push_back(v3);
232  I16.push_back(v1); I16.push_back(v3); I16.push_back(v4);
233 }
float SLfloat
Definition: SL.h:173
unsigned short SLushort
Definition: SL.h:169
SLVec3< SLfloat > SLVec3f
Definition: SLVec3.h:318
SLVuint I32
Vector of vertex indices 32 bit.
Definition: SLMesh.h:215
SLVushort I16
Vector of vertex indices 16 bit.
Definition: SLMesh.h:214
SLVCol4f C
Vector of vertex colors (opt.) layout (location = 4)
Definition: SLMesh.h:206
SLVVec3f N
Vector for vertex normals (opt.) layout (location = 1)
Definition: SLMesh.h:204
SLVVec2f UV[2]
Array of 2 Vectors for tex. coords. (opt.) layout (location = 2)
Definition: SLMesh.h:205
SLVVec3f P
Vector for vertex positions layout (location = 0)
Definition: SLMesh.h:203
SLMaterial * mat() const
Definition: SLMesh.h:177
static SLVec4 GREEN
Definition: SLVec4.h:217
static SLVec4 RED
Definition: SLVec4.h:216
static SLVec4 BLUE
Definition: SLVec4.h:218
V3 v3(float x, float y, float z)
Definition: WAIMath.h:38

Member Data Documentation

◆ _arrowHeadLength

SLfloat SLCoordAxis::_arrowHeadLength
private

Lenght of the arrow head.

Definition at line 42 of file SLCoordAxis.h.

◆ _arrowHeadWidth

SLfloat SLCoordAxis::_arrowHeadWidth
private

Width of the arrow head.

Definition at line 43 of file SLCoordAxis.h.

◆ _arrowThickness

SLfloat SLCoordAxis::_arrowThickness
private

Thickness of the arrow.

Definition at line 41 of file SLCoordAxis.h.


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