Archived

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

[3dmax] basic shape info?

This topic is 5018 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);
			}
		}
[source] 

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