Class: leg
API
Source Code
class leg : avatarParts ( # Information for: hipx,hipy,hipz,hipr, # Hip legx,legy,legz,legh,legt,legb, # Leg feetx,feety,feetz,feetir,feetor, # Feet l,f,h # 3D drawing calls ) method render(side,pcolor,shcolor) PushMatrix() if side == "l" then Translate(hipx,-hipy,hipz) else Translate(-hipx,-hipy,hipz) initRMatrix() if (pcolor[*pcolor-3:*pcolor+1] == ".gif")|(pcolor[*pcolor-3:*pcolor+1] == ".GIF") then WAttrib("texmode=on","texture="||pcolor) else { WAttrib("texmode=off") Fg("ambient "||pcolor)} h:=DrawSphere(0,0,0, hipr) l:=DrawCylinder(0, -legh, 0, legh, legt, legb) if (shcolor[*shcolor-3:*shcolor+1] == ".gif")|(shcolor[*shcolor-3:*shcolor+1] == ".GIF") then WAttrib("texmode=on","texture="||shcolor) else { WAttrib("texmode=off") Fg("ambient "||shcolor)} f:=DrawTorus(0, -legh, 0, feetir, feetor) PopMatrix() end initially() hipx := 0.25 hipy := 0.95 hipz := 0 hipr := 0.23 legx := hipx legy := hipy legz := hipz legh := 0.85 legt := hipr*0.7 legb := hipr*0.7 feetx := legx feety := legy+legh feetz := legz feetir := 0.13 feetor := 0.2 end