Createing Dynamic Cubes, Cylinders, Polygons
by Ricky · in Technical Issues · 06/30/2006 (9:00 am) · 6 replies
Hi All,
I've been trying to figure this out for a few days and have tried searching, but what I found couldn't help me or had bad links.
What I'm trying to do is create a dynamic cube or some kind of shape through the C++ code. It seems something very simple, but I can't figure it out. I would also like to be able to set it's position, scale, rotate it, and rotate it around a point at will later on too. The Shapes I would prefer not to interact with any of the physics of the Engine, and move their positions accordingly to what I have hard coded. But the key to this, is that I would want to do this through C++ and also I would want to create these dynamically during the run, which I can figure out where to code it, but I can't figure out what calls I need to do just to create a cube and put it inside the engine.
I've used 3DSTATE and TrueVision before using this tool and was able to figure it out easily, but for some reason I can't figure this out for Torque.
I would also like to be able to load a world without going through any initial gui interface or logo.
These seem to be simple things, but I just can't figure them out.
All help is appreciated.
I've been trying to figure this out for a few days and have tried searching, but what I found couldn't help me or had bad links.
What I'm trying to do is create a dynamic cube or some kind of shape through the C++ code. It seems something very simple, but I can't figure it out. I would also like to be able to set it's position, scale, rotate it, and rotate it around a point at will later on too. The Shapes I would prefer not to interact with any of the physics of the Engine, and move their positions accordingly to what I have hard coded. But the key to this, is that I would want to do this through C++ and also I would want to create these dynamically during the run, which I can figure out where to code it, but I can't figure out what calls I need to do just to create a cube and put it inside the engine.
I've used 3DSTATE and TrueVision before using this tool and was able to figure it out easily, but for some reason I can't figure this out for Torque.
I would also like to be able to load a world without going through any initial gui interface or logo.
These seem to be simple things, but I just can't figure them out.
All help is appreciated.
#2
I have a license, I just made a new user account to post to the forum because I would prefer to not use the full name when posting.
06/30/2006 (10:01 am)
I found some basic shapes in the dts class, but unsure if I can use those. I'll take a look at what you're saying.I have a license, I just made a new user account to post to the forum because I would prefer to not use the full name when posting.
#3
Questions regarding source code cannot be answered in public forums, so you'll need to ask the question in a private forum area, which requires you to log in with your licensed account.
06/30/2006 (10:03 am)
You can change your display name to be whatever you like.Questions regarding source code cannot be answered in public forums, so you'll need to ask the question in a private forum area, which requires you to log in with your licensed account.
#4
I have a license, I just made a new user account to post to the forum because I would prefer to not use the full name when posting.
06/30/2006 (10:04 am)
I found some basic shapes in the dts class, but unsure if I can use those. I'll take a look at what you're saying.I have a license, I just made a new user account to post to the forum because I would prefer to not use the full name when posting.
#5
06/30/2006 (10:05 am)
Okay Thanks, I'll do that!
#6
06/30/2006 (10:11 am)
Okay Thanks, I'll do that!
Torque Owner Badguy
functions that have been prepared to draw stuff. you could maybe modify them.
for example triggers, the spawn sphere, way point markers.
if you pick one of these objects and grep the code base you will no doubt find all the relative code to help you get this sucker on the screen.
If you have OpenGL drawing experience you will find no trouble modifying one of these functions to draw a cube.
(pretty sure there is no cube prefab)
Edit:
hmm I note you do not have a license. how are you able to insert c++ code to the engine?