资源简介
这是一个网格模型的简化算法,使用了二次误差技术。
代码片段和文件信息
/*
The interface routines for reading and writing PLY polygon files.
Greg Turk February 1994
---------------------------------------------------------------
A PLY file contains a single polygonal _object_.
An object is composed of lists of _elements_. Typical elements are
vertices faces edges and materials.
Each type of element for a given object has one or more _properties_
associated with the element type. For instance a vertex element may
have as properties the floating-point values xyz and the three unsigned
chars representing red green and blue.
---------------------------------------------------------------
Copyright (c) 1994 The Board of Trustees of The Leland Stanford
Junior University. All rights reserved.
Permission to use copy modify and distribute this software and its
documentation for any purpose is hereby granted without fee provided
that the above copyright notice and this permission notice appear in
all copies of this software and that you do not sell the software.
THE SOFTWARE IS PROVIDED “AS IS“ AND WITHOUT WARRANTY OF ANY KIND
EXPRESS IMPLIED OR OTHERWISE INCLUDING WITHOUT LIMITATION ANY
WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
*/
#include
#include
#include
#include
#include “ply.h“
char *type_names[] = {
“invalid“
“char“ “short“ “int“
“uchar“ “ushort“ “uint“
“float“ “double“
};
int ply_type_size[] = {
0 1 2 4 1 2 4 4 8
};
#define NO_OTHER_PROPS -1
#define DONT_STORE_PROP 0
#define STORE_PROP 1
#define OTHER_PROP 0
#define NAMED_PROP 1
/* returns 1 if strings are equal 0 if not */
int equal_strings(char * char *);
/* find an element in a plyfile‘s list */
PlyElement *find_element(PlyFile * char *);
/* find a property in an element‘s list */
PlyProperty *find_property(PlyElement * char * int *);
/* write to a file the word describing a PLY file data type */
void write_scalar_type (FILE * int);
/* read a line from a file and break it up into separate words */
char **get_words(FILE * int * char **);
char **old_get_words(FILE * int *);
/* write an item to a file */
void write_binary_item(FILE * int unsigned int double int);
void write_ascii_item(FILE * int unsigned int double int);
double old_write_ascii_item(FILE * char * int);
/* add information to a PLY file descriptor */
void add_element(PlyFile * char ** int);
void add_property(PlyFile * char ** int);
void add_comment(PlyFile * char *);
void add_obj_info(PlyFile * char *);
/* copy a property */
void copy_property(PlyProperty * PlyProperty *);
/* store a value into where a pointer and a type specify */
void store_item(char * int int unsigned int double);
/* return the value of a stored item */
void get_stored_item( void * int int * unsigned int * double *);
/* return the value stored in an item given ptr to it and its type */
double get_item_value(char * int);
/* ge
- 上一篇:网络安全基础应用与标准第4版课件
- 下一篇:Laya Wechat Demo
相关资源
- SWAT-CUP2012手册简化版
- 基于adams软件的挖掘机简化模型的仿真
- 简化进销存系统
- ZXing竖屏简化版
- 简化版zxing导入自己项目直接使用
- 基于SIMPACK软件的客车简化整车模型的
- 用winsock设计简化的ping应用程序
- 土石坝稳定分析系统(简化版)
- 海康威视实时视频预览+opencv实时处理
- 日文简化CAD ROOT PRO CAD
- 保密检查工具简化版.iso
- SD-UHS-II简化规范中文完整翻译.pdf
- 32位jdk精简版 从原来的360多M简化为现
- 简化stata中倍差法的估计
- 简化的极化码译码算法
- opengl显示网格模型
- 道格拉斯普客算法的R语言实现
- 世界河流_简化.shp
- 简化 TYPE-C封装库
- OFDM系统简化的lmmse信道估计算法
- Visio 2010简体中文64位(百度网盘地址
- 经典小波变换EWT简化版
- MIMO标准信道模型WINNERII简化
- 卡诺图简化软件
- 一种更简化而高效的粒子群优化算法
- 知乎小程序简化版
- LLR_BP算法的简化译码算法研究
- 简化Mellin空间中的大型自旋引导程序
- IBM BladeCenter的IT前景展望集中并简化您
- Postman插件 官方绿色版---简化测试流程
评论
共有 条评论