On Mar 29, 2006, at 11:10 AM, Lo Saeteurn wrote:
It was initially designed to use the built-in trimesh classes, but
I ran into the problem of not being able to add a trimesh into an
object3D. The advantage of using an object3d as opposed to a
trimesh is the ability to clone. Cloning is useful because I can
reuse the same character multiple times without rebuilding it--this
is important to dynamically change text with speed.
Build your own clone method. I ran into the same issue building a LCD
display. The following did the trick for me. It was included in the
LCD class.
CloneTrimesh(original As Trimesh)
Dim clone As New Trimesh
clone.VertexCount = original.VertexCount
clone.TriangleCount = original.TriangleCount
clone.VertexPositions.Copy(original.VertexPositions)
clone.Triangles.Copy(original.Triangles)
clone.HasVertexUVs = True
clone.VertexUVs.Copy(original.VertexUVs)
clone.Material = original.Material
clone.Scale = original.Scale
Return(clone)
HTH,
Joe
--
Joseph Nastasi
Pyramid Design - a software development firm
http://www.pyramiddesign.us
Voice 609 601-0814 Fax 609 601-0815
Products:
A-OK! The Wings of Mercury http://www.aokwom.com
A-OK! Spacecraft Simulation System - http://www.aoksss.com
FTP Suite for REALbasic - http://www.ftpsuite.com
Columnist for REALbasic Developer Magazine
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|