POV-Ray : Newsgroups : povray.animations : TECH: Templates Server Time
28 Jul 2024 22:31:34 EDT (-0400)
  TECH: Templates (Message 1 to 1 of 1)  
From: Mathias Broxvall
Subject: TECH: Templates
Date: 23 May 1998 11:03:37
Message: <3566E549.77D4@swipnet.se>
Hi!

Okay I think I'd better post this here, since I messed up my
last post to the (web) tech board. And besided I like nttp better
than http. (Just guess how often Netscape crashes...)

What I was going to say was that we'd better develop some kind
of standard templates for the object modellers to use as early
as possible. I thought all objects could have a header somewhat
like this:

// (c) 1998-01-02 - The Internet Movie Project (tm)
// File: Warrior1.inc
// Original Author: Foo Barfool
// Creation: 1998-01-02 
// Modifications: 1998-03-04 - Arthure C. Clarke ; Added a bow
//                1998-05-02 - Johnie Walker     ; Added hair
//                ....

// Object: Warrior1
// Kind: Humanoid 1 & Uniform 1
// Dimensions: 0.5 x 1.0 x 1.80
// Center: <0.25,0.5,1.0>
// Komplexity: Huge
// Description: This is a standard warrior carrying .....
// Extra variables: cBowColor
// Prefix: W1

I thought the 'Kind' field could be used to define what animation
variables are available from a set of predefined classes of
object kinds - possibly with "multiple inheritance". Ie:

All object of the kind "Humanoid 1" has the variables: 
aLeftKnee,aRightKnee,aLeftUpperLeg,aRightUpperLeg,aTorso,...,
tSkin,tHair,...

and all objects of the kind "Humanoid 2" *also* has:
aLeftThumb,aLeftIndexFinger,...,aJaw,aMouth,....,cEyeColor,...

and "Uniform 1" has: tLeftLeg,tRightLeft,tTorso,tStripes,...,

well I guess you get the idea... I have adopted one of the earlier
suggested naming conventions and used the prefix "a" to stand for
"Angle". Ie aLeftKnee speficies the angle the left knee is bended
(away from the "normal" angle - straight)
 
Also I suggest to use a package convention for whatever internal
variables the includefile uses. Ie use W1_MyInternalVariable for
all 'internal' variables in the above file. (Stated in the 'Prefix'
field)

Maybe we also want to export variables from the include file, ie
define the variables Width,Height,Center,... at the end of the
include file so that it is easier to automagically move the
object with a smart script.

What do you think?

/ Mathias Broxvall


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.