Subject:
|
Re: Animation - LDraw Object Classes - help needed!
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Mon, 3 Sep 2001 00:25:12 GMT
|
Viewed:
|
447 times
|
| |
| |
Tore Eriksson wrote:
> So, finally I have made all the preparations to begin the work with creating the framework for LDraw Object Classes
> aimed towards animation scripting.
>
> My inspiration comes from the Borland Delphi world, but I'm open for other, easier, more flexible, better suited or
> whatever systems you suggest.
Interesting. Eventually I want to include an animation scripting feature in
the CAD program I'm developing (which happens to be written in Delphi).
Perhaps we can collaborate to some extent.
> Just like TObject is the ancestor of all Delphi classes, I suggest a class called LDObject.
>
> Now, how and where do we declare it?
> LDObject1 = class (LDObject) // or something like that?
> // Could be a Part, a Primitive (not likely though), or a [Sub-]Model.
There's no need to define the scripting language as being _exclusively_ for
Lego models. I'd suggest naming this class "Entity" or something similar
instead to make it generic and applicable to anything. For example, in the
CAD program I'm developing, I have a generic TEntity object that happens to
represent a Lego model, sub-model, part, sub-part, primitive, etc. but it's
all abstracted so it could just as easily be a piece of furniture you're
dragging through a floorplan of a house. The higher-level code has no idea
what the user is manipulating, they just happen to be LDraw objects.
According to Webster, entity = n. something existing complete in itself, by
its own right
Just a suggestion.
> The LDObject class has these properties predefined:
> Name: String; // In this case: 'LDObject1', user may change it
> Index: Integer; // 0-999, assigned by program, user cannot change.
Sort of a pointer
Why not 0..MaxInt instead of limiting it to 1,000 objects?
> Color: Longint; //
I suggest you rename this to ColorCode so it doesn't get confused with an
actual RGB value.
> We also need some movement and rotation properties.
> With rotation, I don't mean like the static 0 ROTATE command, but rather
the spinning movement.
You might be able to use a standard matrix to represent the rotation of an
object between consecutive animation frames, then the animating program
could apply this rotation matrix over and over again.
Will objects be forced to rotate around their insertion points (local
origins), or can we define centers of mass (the point an object would rotate
around if spun in the absense of external gravitational influence)?
For that matter, I wish there was a database somewhere that contained the
approximate mass of every Lego part that exists in LDraw format. Then my
CAD program could determine the total mass and approximate center of mass
for a given model.
I have a digital postal scale (with 100-milligram resolution) that I plan to
use to develop such a database if none currently exists. If I use it to
weigh ten parts at a time, I can divide the total reading by 10 to get
artifical 10-milligram resolution.
(I apologize for rambling!)
-Gary
|
|
Message has 1 Reply: | | Re: Animation - LDraw Object Classes - help needed!
|
| (...) Cool! I'd love to. (...) I see your point. It seems like LDObject won't be the highest ancestor class anyway. I plan to define LDraw Camera and POV camera differently (but I might change my mind) Is it possible to let a compiled and (...) (23 years ago, 5-Sep-01, to lugnet.cad.dev)
|
Message is in Reply To:
| | Animation - LDraw Object Classes - help needed!
|
| So, finally I have made all the preparations to begin the work with creating the framework for LDraw Object Classes aimed towards animation scripting. My inspiration comes from the Borland Delphi world, but I'm open for other, easier, more flexible, (...) (23 years ago, 3-Sep-01, to lugnet.cad.dev)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|