Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenFlipper
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
e91b1821
Commit
e91b1821
authored
Apr 09, 2019
by
Heng Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add GlutPrimitiveNode-ConeSupport
parent
e35e0232
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
libs_required/ACG/Scenegraph/GlutPrimitiveNode.cc
libs_required/ACG/Scenegraph/GlutPrimitiveNode.cc
+7
-0
libs_required/ACG/Scenegraph/GlutPrimitiveNode.hh
libs_required/ACG/Scenegraph/GlutPrimitiveNode.hh
+7
-1
No files found.
libs_required/ACG/Scenegraph/GlutPrimitiveNode.cc
View file @
e91b1821
...
...
@@ -75,6 +75,7 @@ GlutPrimitiveNode::GlutPrimitiveNode( BaseNode* _parent,
const
int
stacks
=
20
;
sphere_
=
new
ACG
::
GLSphere
(
slices
,
stacks
);
cone_
=
new
ACG
::
GLCone
(
slices
,
stacks
,
1.0
,
0
,
true
,
false
);
};
//----------------------------------------------------------------------------
...
...
@@ -93,6 +94,7 @@ GlutPrimitiveNode::GlutPrimitiveNode(GlutPrimitiveType _type,
primitives_
.
push_back
(
p
);
sphere_
=
new
ACG
::
GLSphere
(
slices
,
stacks
);
cone_
=
new
ACG
::
GLCone
(
slices
,
stacks
,
1.0
,
0
,
true
,
false
);
}
void
...
...
@@ -451,7 +453,12 @@ getRenderObjects(IRenderer* _renderer, GLState& _state , const DrawModes::DrawM
ro
.
debugName
=
std
::
string
(
"glutprimitive.sphere no "
)
+
std
::
to_string
(
i
)
+
": "
+
name
();
sphere_
->
addToRenderer
(
_renderer
,
&
ro
,
primitives_
[
i
].
size
);
break
;
case
CONE
:
//Cone
ro
.
debugName
=
std
::
string
(
"glutprimitive.cone no "
)
+
std
::
to_string
(
i
)
+
": "
+
name
();
cone_
->
addToRenderer
(
_renderer
,
&
ro
,
primitives_
[
i
].
innersize
);
break
;
default:
...
...
libs_required/ACG/Scenegraph/GlutPrimitiveNode.hh
View file @
e91b1821
...
...
@@ -178,7 +178,12 @@ public:
/// destructor
virtual
~
GlutPrimitiveNode
()
{}
virtual
~
GlutPrimitiveNode
()
{
if
(
sphere_
)
delete
sphere_
;
if
(
cone_
)
delete
cone_
;
}
/**
* Adds a primitive and returns its index.
...
...
@@ -241,6 +246,7 @@ private:
// Sphere rendering
ACG
::
GLSphere
*
sphere_
;
ACG
::
GLCone
*
cone_
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment