- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
LEG.CPP
资源名称:tc3d.zip [点击查看]
上传用户:abcdshs
上传日期:2007-01-07
资源大小:1858k
文件大小:2k
源码类别:
游戏
开发平台:
Visual C++
- // (C) Copyright 1996 by Anthony J. Carin. All Rights Reserved.
- #include "stdafx.h"
- #include "leg.h"
- leg::leg(personal *p) : baseobject(p->thigh())
- {
- coordinate tmp(0.0f,-0.5f*p->hight(),0.0f);
- knee = new attachment(tmp);
- m_shin = new shin(p);
- knee->attachto(m_shin);
- }
- leg::~leg()
- {
- delete knee;
- delete m_shin;
- }
- void leg::setcolor(COLORREF c)
- {
- baseobject::setcolor(c);
- m_shin->setcolor(c);
- }
- void leg::draw()
- {
- baseobject::draw();
- knee->draw();
- }
- void leg::setto(view& c)
- {
- baseobject::setto(c);
- knee->setxoff(xposition);
- knee->setyoff(yposition);
- knee->setzoff(zposition);
- knee->setto(c);
- }
- shin::shin(personal *p) : baseobject(p->lowerleg())
- {
- coordinate tmp(0.0f,-0.5f*p->hight(),0.0f);
- ankle = new attachment(tmp);
- m_foot = new foot(p);
- ankle->attachto(m_foot);
- }
- shin::~shin()
- {
- delete ankle;
- delete m_foot;
- }
- void shin::setcolor(COLORREF c)
- {
- baseobject::setcolor(c);
- }
- void shin::draw()
- {
- baseobject::draw();
- ankle->draw();
- }
- void shin::setto(view& c)
- {
- baseobject::setto(c);
- ankle->setxoff(xposition);
- ankle->setyoff(yposition);
- ankle->setzoff(zposition);
- ankle->setto(c);
- }
- foot::foot(personal *p) : baseobject(p->foot())
- {
- setcolor(RGB(10,10,10));
- }
- foot::~foot()
- {
- }
- totalleg::totalleg(coordinate& offset, personal *p)
- {
- legjoint = new attachment(offset);
- m_leg = new leg(p);
- legjoint->attachto(m_leg);
- }
- totalleg::~totalleg()
- {
- delete m_leg;
- delete legjoint;
- }