GithubHelp home page GithubHelp logo

model-sizes-plus's Introduction

Model Sizes Plus

Updated, advanced, more precise version of the old modelsizes include.

Details

Basically said, this is just the better version of the old one. When you know what makes this one better you'll drop the old one immediatly!

  • Contains SA-MP objects.
  • Extreme percision (see picture below for comparison). *
  • Exact offsets.
  • Easy to update with new versions of SA-MP (new objects).
  • Adds exact bounding boxes.
  • Adds exact dimensions.

Generator

//Model Sphere Export
fremove("sizes.txt"); fremove("offsets.txt");
new Line[2][1536], Float:oX, Float:oY, Float:oZ, Float:R, File:Sizes = fopen("sizes.txt", io_append), File:Offsets = fopen("offsets.txt", io_append);
for(new row; row < 2000; row++)
{
	Line[0][0] = EOS; Line[1][0] = EOS;
	strcat(Line[0], "\t\t"); strcat(Line[1], "\t\t");
	for(new col; col < 10; col++)
	{
		CA_GetModelBoundingSphere((row * 10) + col, oX, oY, oZ, R);
		strcat(Line[0], sprintf("%0.6f, ", R));
		strcat(Line[1], sprintf("{%0.6f, %0.6f, %0.6f}, ", oX, oY, oZ));
	}
	strcat(Line[0], "\r\n"); strcat(Line[1], "\r\n");
	fwrite(Sizes, Line[0]); fwrite(Offsets, Line[1]);
}
fclose(Sizes);
fclose(Offsets);
//Model Dimension Export
fremove("dims.txt");
new Line[1536], Float:Min[3], Float:Max[3], File:Dimensions = fopen("dims.txt", io_append);
	
for(new row; row < 4000; row++)
{
	Line[0] = EOS;
	strcat(Line, "\t\t");
	for(new col; col < 5; col++)
	{
		CA_GetModelBoundingBox((row * 5) + col, Min[0], Min[1], Min[2], Max[0], Max[1], Max[2]);
		strcat(Line, sprintf("{{%0.6f, %0.6f, %0.6f}, {%0.6f, %0.6f, %0.6f}}, ", Min[0], Min[1], Min[2], Max[0], Max[1], Max[2]));
	}
	strcat(Line, "\r\n");
	fwrite(Dimensions, Line);
}
fclose(Dimensions);

Extra

Example Image

* Green = New, Red = Old

* Many (most) other objects are affected also. Many even have differences over 100, A couple have differences over 200! Kalcor can't be blamed for these faults though, he extracted the data directly form the game files.

Thanks Y-Less for releasing the old one.

Thanks Pottus, Chris420, and Slice for ColAndreas (making this possible).

To see major range differences (above 1.0), see the differences.csv table.

model-sizes-plus's People

Contributors

crayder avatar omcho420 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thomas14 omcho420

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.