Содержание
Оглавление
Введение 2
Трехмерная графика 3
Описание работы программы 4
Процесс преобразования координат 5
Описание классов и методов в программе 7
Описание файлового формата моделей 11
Интерфейс программы 13
Список литературы 14
Исходный код 15
ObjLoader 16
Matrix 18
Vector 22
Model 26
Основная форма 39
Выдержка из текста
Введение
В данной работе необходимо создать приложение, обеспечивающее рисование планеты Земля и спутника, двигающегося по ее орбите.
Список использованной литературы
фрагмент
Model
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
namespace earth
{
public class TriIndex
{
public int[]
v = new int[3],
n = new int[3],
t = new int[3];
public void SetV(int v0, int v1, int v2)
{
v[0] = v0;
v[1] = v1;
v[2] = v2;
}
public void SetV(int _v, int i)
{
v[i] = _v;
}
public void SetN(int n0, int n1, int n2)
{
n[0] = n0;
n[1] = n1;
n[2] = n2;
}
public void SetN( int _n, int i )
{
n[i] = _n;
}
public void SetT(int t0, int t1, int t2)
{
t[0] = t0;
t[1] = t1;
t[2] = t2;
}
public void SetT( int _t, int i )
{
t[i] = _t;
}
public void Copy(int to_i, TriIndex from, int from_i)
{
v[to_i] = from.v[from_i];
n[to_i] = from.n[from_i];
t[to_i] = from.t[from_i];
}
public TriIndex()
{
}
public TriIndex(int v1, int v2, int v3)
{
SetV(v1, v2, v3);
}
}
// Рисует треугольники к примеру
public class Mesh
{
public const int mNormals = 1;
public const int mTex = 2;
public const int mIndexed = 4;
public List<Vector> Vertices;
public List<Vector> Normals = null;
public List<Vector> TexCoords = null;
public int Flags = 0;
public List<TriIndex> Tris = null;
bool is_new(int fl, int m)
{
return ((Flags & m) == 0) & ((fl & m) != 0);
}
public void AddCap( int fl)
{
if (is_new( fl, mNormals ))
Normals = new List<Vector>();
if (is_new( fl, mTex))
TexCoords = new List<Vector>();
if (is_new( fl, mIndexed))
Tris = new List<TriIndex>();
Flags |= fl;
}
public Mesh(int fl)
{
Flags = 0;
Vertices = new List<Vector>();
AddCap(fl);
}
Vector GetNorm(int tr_i)
{
Vector n, v, v2;
TriIndex tri = Tris[tr_i];
С этим материалом также изучают
... IMF, 2009.- 66 p.20.International monetary system// http://www.examen.ru/add/School-Subjects/Social-Sciences/Economics/966721.Kireev L. P. International ... России как субъекта международной политики. List of references 1.Andrianov V.D.. About ...
... международной валютной системы(Problems and challenges of the international monetary system) Список использованной литературы List of references 1.Andrianov V.D.. About possible approaches to ...
... systems81.3 Examples of financial systems11Chapter 2 Financial system of the UAE: main features and ... characteristics13Introduction132.1 General overview of financial system of UAE142.2 Analysis of banking sector19Chapter 3. ...
... when the stifling atmosphere of public life 70-80's gave birth ... young people created their own "system" as a slang language gesture of ... международной торговли, внешнеэкономической деятельности. Literature list 1.Basic problem of IFRS implementation ...
... ApS.Hainmueller, J. and Hopkins, D.J. (2014). Public Attitudes Toward Immigration. Annual Review of Political ... 6Findings 8Discussion 14Conclusions and recommendations 16Reference list 17Appendix 1: Questionnaire 21Appendix 2: Filled questionnaire ...
Полный разбор дипломной работы на тему PR в управлении трудом. Узнайте, как современные PR-технологии помогают строить HR-бренд, мотивировать сотрудников и улучшать внутренние коммуникации на основе теоретических положений и практических примеров.
... Policy and Society (COMPASS).Citrin, J. (2014). Public Opinion about Immigration: The Role of Identities, ... University Institute.Hainmueller, J. and Hopkins, D.J. (2014). Public Attitudes Toward Immigration. Annual Review of Political Science, ...
Подробный разбор структуры дипломной работы по PR в управлении трудом. Узнайте, как правильно составить план, наполнить каждую главу и избежать частых ошибок.
... is that it carries out regulating impact on the public relations, forming defined "measured environment" (B. A. Kistyakovsky) ... providing rather steady and stable existence of social system, its integrity and unity, protection of the national ...
... Among Punctuation MarksConclusionBibliographyСодержание Выдержка из текста English Metagraphic System throuhh History The aim of the work ... of capitalisation and punctuation performance of Florida public school students in grades five, eight, and ...