Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
LEG.CPP
Package: tc3d.zip [view]
Upload User: abcdshs
Upload Date: 2007-01-07
Package Size: 1858k
Code Size: 2k
Category:
Game Program
Development Platform:
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;
- }