Submitted by Zachary Booth Simpson on 12/5/2000
ⓒ 2000 - Zachary Booth Simpson.opied with permission from http://www.totempole.net. If you find any of this work useful, please sign Zack's guest book: http://www.totempole.net/cgi-bin/gbook.cgi.
날림 번역 세번째... 번역의 중단을 아쉬워하며.... :) 2003-11-05 10:06, 파도
Pass-off special render cases to Model code.
모델 코드속으로 랜더링 루틴의 이전
Generic View code often becomes clotted with special cases, especially near the end of a project. Render Delegation gets the special cases out of the View code and into Model subclasses.
일반적인 뷰 코드들은 종종 특별한 경우들에 의해 코드가 종속적으로 얽매이곤 한다. 특히, 프로젝트의 막바지에 이르르게 되면 더욱 그러하다. 랜더링 위임 기법은 뷰 코드로 부터 이러한 특별한 경우들을 제거하고 모델의 서브 클래스 속으로 이전할 수 있게 해준다.
An example clot in View code:
if (typeToDraw==DARTH_VADERS_SHIP)
drawSpecialShieldEffect();
다음 예는 뷰 코드가 종속적으로 얽매인 경우이다.
if (typeToDraw==DARTH_VADERS_SHIP)
drawSpecialShieldEffect();
To encapsulate these kinds of special cases, the View delegates the draw back to the Model. For example:
objectToDraw->draw(x,y)
이러한 특별한 경우를 캡슐화 하기 위해서 뷰는 모델 속으로 드로잉 루틴을 이전한다. 예를 들면 다음과 같다.
objectToDraw->draw(x,y)
It is common for the view to do the transformation and sorting work and pass screen coordinates to the draw method of a model. 뷰에서는 이러한 변환을 수행하고 작업을 분류하고 모델의 드로잉 루틴에 화면상 위치를 전달해주는 게 일반적이다.
지금은 없음.
지금은 없음. kevin@gamedev.net 로 예제를 보내주세요
Use Render Delegation when:
다음과 같은 경우에 랜더링 위임 기법을 사용해라.
Don't use Render Delegation when:
다음과 같은 경우에는 랜더링 위임 기법을 사용하지 말아야 한다.
Render Delegation passes draw commands from View to Model. Render Delegation may be part of an Appearance Map.
랜더링 위임 기법은 드로잉 명령어들을 뷰로 부터 모델로 전달해준다. 랜더링 위임 기법은 외형 맵의 일부가 될 수도 있다.
| 제일 위로 |
| 최종 수정 일시: 11월 05일(2003년) 10:06 AM 편집 | 정보 | 차이 | 비슷한 페이지 DebugInfo |
| 유용한 페이지들: 분류 분류 | 자유로운 연습장 SandBox | 무작위 페이지들 RandomPages | 인기있는 페이지들 MostPopular |