Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


[3dmax] basic shape info?

This topic is 5235 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hey i have another problem im stuck on... geting the radius of a sphere or the length/width/breadth of a box for example.... this is the code i currently have:
Object* obj = os.obj;

		if( obj && obj->CanConvertToType(Class_ID(BOXOBJ_CLASS_ID, 0)) )
			Object* shape = 0;
			shape = obj->ConvertToType(0, Class_ID(BOXOBJ_CLASS_ID, 0));

			if( shape != 0 )
				fprintf( pFile, "YAYW WE HAVE A BOX, WHAT NOW?!!!!!\n");

				float length = shape->GetParamBlockIndex(BOXOBJ_LENGTH);
				float height = shape->GetParamBlockIndex(BOXOBJ_HEIGHT);
				float width = shape->GetParamBlockIndex(BOXOBJ_WIDTH);	

				fprintf( pFile, "LENGTH: %f, HEIGHT: %f WIDTH: %f\n", length, width, height);

but i get incorrect values.... 
apparently there is such thing as 
BoxObject looking through the sample code, but it isnt recognised in my code do i need an additional lib or dll?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!