Class: arm
API
Source Code
class arm : avatarParts ( # Information for: sholdx,sholdy,sholdz,sholdr, # Shoulder armx,army,armz,armh,armt,armb, # Arm handx,handy,handz,handr, # Hand s,a,h # 3D drawing call names ) # # render # Purpose: to render the left arm of the avatar # method render(side,color,scolor) PushMatrix() if side == "l" then Translate(sholdx,sholdy,sholdz) else Translate(-sholdx,sholdy,sholdz) initRMatrix() if (scolor[*scolor-3:*scolor+1] == ".gif")|(scolor[*scolor-3:*scolor+1] == ".GIF") then WAttrib("texmode=on","texture="||scolor) else { WAttrib("texmode=off") Fg("ambient "||scolor)} s:=DrawSphere(0,0,0, sholdr) if (color[*color-3:*color+1] == ".gif")|(color[*color-3:*color+1] == ".GIF") then WAttrib("texmode=on","texture="||color) else { WAttrib("texmode=off") Fg("ambient "||color)} a:=DrawCylinder(0, -armh, 0, armh, armt, armb) h:=DrawSphere(0, -handy, 0, handr) # Chicken finger if side == "r" then { DrawCylinder(0.1,-handy-0.25,0.1,0.25,0.07,0.07) DrawSphere(0.1,-handy-0.25,0.1,0.07) } PopMatrix() end initially() sholdx := 0.7 sholdy := -0.1 sholdz := 0 sholdr := 0.3 armx := 0.7 army := -0.05 armz := 0 armh := 1.2 armt := 0.15 armb := 0.15 handx := armx handy := (army+armh)*0.95 handz := armz handr := 0.24 end